-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathoutput_collector_impl.h
36 lines (27 loc) · 1.19 KB
/
output_collector_impl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include <cstdint>
#include "envoy/common/time.h"
#include "nighthawk/client/options.h"
#include "nighthawk/client/output_collector.h"
namespace Nighthawk {
namespace Client {
class OutputCollectorImpl : public OutputCollector {
public:
/**
* @param time_source Time source that will be used to generate a timestamp in the output.
* @param options The options that led up to the output that will be computed by this instance.
*/
OutputCollectorImpl(Envoy::TimeSource& time_source, const Options& options);
void addResult(absl::string_view name, const std::vector<StatisticPtr>& statistics,
const std::map<std::string, uint64_t>& counters,
const std::chrono::nanoseconds execution_duration,
const absl::optional<Envoy::SystemTime>& first_acquisition_time,
const std::vector<nighthawk::client::UserDefinedOutput>&
user_defined_output_results) override;
void setOutput(const nighthawk::client::Output& output) override { output_ = output; }
nighthawk::client::Output toProto() const override;
private:
nighthawk::client::Output output_;
};
} // namespace Client
} // namespace Nighthawk