CppBenchmark  1.0.4.0
C++ Benchmark Library
reporter.h
Go to the documentation of this file.
1 
9 #ifndef CPPBENCHMARK_REPORTER_H
10 #define CPPBENCHMARK_REPORTER_H
11 
13 
14 namespace CppBenchmark {
15 
17 
20 class Reporter
21 {
22 public:
23  Reporter() = default;
24  Reporter(const Reporter&) = delete;
25  Reporter(Reporter&&) = delete;
26  virtual ~Reporter() = default;
27 
28  Reporter& operator=(const Reporter&) = delete;
29  Reporter& operator=(Reporter&&) = delete;
30 
32  virtual void ReportHeader() {}
34  virtual void ReportSystem() {}
36  virtual void ReportEnvironment() {}
38  virtual void ReportBenchmarksHeader() {}
40  virtual void ReportBenchmarksFooter() {}
42  virtual void ReportBenchmarkHeader() {}
44  virtual void ReportBenchmarkFooter() {}
46 
50  virtual void ReportBenchmark(const BenchmarkBase& benchmark, const Settings& settings) {}
52  virtual void ReportPhasesHeader() {}
54  virtual void ReportPhasesFooter() {}
56  virtual void ReportPhaseHeader() {}
58  virtual void ReportPhaseFooter() {}
60 
64  virtual void ReportPhase(const PhaseCore& phase, const PhaseMetrics& metrics) = 0;
66  virtual void ReportFooter() {}
67 };
68 
69 } // namespace CppBenchmark
70 
71 #endif // CPPBENCHMARK_REPORTER_H
Benchmark base definition.
Benchmark base class.
Benchmark phase core.
Definition: phase_core.h:27
Benchmark phase metrics.
Definition: phase_metrics.h:37
Reporter base class.
Definition: reporter.h:21
virtual void ReportBenchmarksFooter()
Report all benchmarks footer.
Definition: reporter.h:40
virtual void ReportPhase(const PhaseCore &phase, const PhaseMetrics &metrics)=0
Report current phase information.
virtual void ReportPhaseHeader()
Report current phase header.
Definition: reporter.h:56
Reporter & operator=(const Reporter &)=delete
virtual void ReportBenchmarkHeader()
Report current benchmark header.
Definition: reporter.h:42
Reporter & operator=(Reporter &&)=delete
virtual void ReportEnvironment()
Report environment information.
Definition: reporter.h:36
virtual void ReportHeader()
Report header.
Definition: reporter.h:32
virtual void ReportFooter()
Report footer.
Definition: reporter.h:66
virtual void ReportPhasesFooter()
Report all phases footer.
Definition: reporter.h:54
Reporter(const Reporter &)=delete
virtual void ReportBenchmarkFooter()
Report current benchmark footer.
Definition: reporter.h:44
virtual void ReportBenchmark(const BenchmarkBase &benchmark, const Settings &settings)
Report current benchmark information.
Definition: reporter.h:50
virtual void ReportBenchmarksHeader()
Report all benchmarks header.
Definition: reporter.h:38
virtual ~Reporter()=default
Reporter(Reporter &&)=delete
virtual void ReportPhaseFooter()
Report current phase footer.
Definition: reporter.h:58
virtual void ReportPhasesHeader()
Report all phases header.
Definition: reporter.h:52
virtual void ReportSystem()
Report system information.
Definition: reporter.h:34
Benchmark settings.
Definition: settings.h:32
C++ Benchmark project definitions.
Definition: barrier.h:15