CppBenchmark  1.0.4.0
C++ Benchmark Library
reporter_csv.h
Go to the documentation of this file.
1 
9 #ifndef CPPBENCHMARK_REPORTER_CSV_H
10 #define CPPBENCHMARK_REPORTER_CSV_H
11 
12 #include "benchmark/reporter.h"
13 
14 #include <iostream>
15 
16 namespace CppBenchmark {
17 
19 
24 class ReporterCSV : public Reporter
25 {
26 public:
28 
33  ReporterCSV(std::ostream& stream = std::cout) : _stream(stream) {}
34  ReporterCSV(const ReporterCSV&) = delete;
35  ReporterCSV(ReporterCSV&&) = delete;
36  virtual ~ReporterCSV() = default;
37 
38  ReporterCSV& operator=(const ReporterCSV&) = delete;
40 
41  // Implementation of Reporter
42  void ReportHeader() override;
43  void ReportPhase(const PhaseCore& phase, const PhaseMetrics& metrics) override;
44 
45 private:
46  std::ostream& _stream;
47 };
48 
49 } // namespace CppBenchmark
50 
51 #endif // CPPBENCHMARK_REPORTER_CSV_H
Benchmark phase core.
Definition: phase_core.h:27
Benchmark phase metrics.
Definition: phase_metrics.h:37
Comma-separated values (CSV) reporter.
Definition: reporter_csv.h:25
ReporterCSV & operator=(ReporterCSV &&)=delete
ReporterCSV(const ReporterCSV &)=delete
void ReportPhase(const PhaseCore &phase, const PhaseMetrics &metrics) override
Report current phase information.
ReporterCSV(std::ostream &stream=std::cout)
Default class constructor.
Definition: reporter_csv.h:33
virtual ~ReporterCSV()=default
ReporterCSV & operator=(const ReporterCSV &)=delete
void ReportHeader() override
Report header.
ReporterCSV(ReporterCSV &&)=delete
Reporter base class.
Definition: reporter.h:21
C++ Benchmark project definitions.
Definition: barrier.h:15
Reporter base definition.