cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
i_reporter.h
Go to the documentation of this file.
1/*
2 * Copyright 2021 MusicScience37 (Kenta Kabashima)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
20#pragma once
21
22#include <exception>
23
31
32namespace stat_bench {
33namespace reporter {
34
38class IReporter {
39public:
45 virtual void experiment_starts(
46 const clock::SystemTimePoint& time_stamp) = 0;
47
53 virtual void experiment_finished(
54 const clock::SystemTimePoint& time_stamp) = 0;
55
62 virtual void group_starts(const BenchmarkGroupName& name,
63 const bench_impl::BenchmarkGroupConfig& config) = 0;
64
70 virtual void group_finished(const BenchmarkGroupName& name) = 0;
71
78 const measurer::MeasurementType& type) = 0;
79
86 const measurer::MeasurementType& type) = 0;
87
93 virtual void case_starts(const BenchmarkFullName& case_info) = 0;
94
100 virtual void case_finished(const BenchmarkFullName& case_info) = 0;
101
108 const measurer::Measurement& measurement) = 0;
109
117 virtual void measurement_failed(const BenchmarkFullName& case_info,
118 const BenchmarkCondition& cond, const std::exception_ptr& error) = 0;
119
120 IReporter(const IReporter&) = delete;
121 IReporter(IReporter&&) = delete;
122 auto operator=(const IReporter&) -> IReporter& = delete;
123 auto operator=(IReporter&&) -> IReporter& = delete;
124
128 virtual ~IReporter() = default;
129
130protected:
134 IReporter() = default;
135};
136
137} // namespace reporter
138} // namespace stat_bench
Definition of BenchmarkCondition class.
Definition of BenchmarkFullName class.
Definition of BenchmarkGroupConfig class.
Definition of BenchmarkGroupName class.
Class of conditions of benchmarks.
Class of information of cases in benchmarks.
Class of names of groups of benchmarks.
Class of configuration of a group of cases in benchmarks.
Class of time points of system clocks.
Class of names of measurement types.
Class of data of measurements.
Definition measurement.h:42
virtual void measurement_type_finished(const measurer::MeasurementType &type)=0
Finished a measurement with a type.
virtual void case_starts(const BenchmarkFullName &case_info)=0
Start a case of a benchmark.
virtual void group_finished(const BenchmarkGroupName &name)=0
Finished a group of benchmarks.
virtual void group_starts(const BenchmarkGroupName &name, const bench_impl::BenchmarkGroupConfig &config)=0
Start a group of benchmarks.
virtual void case_finished(const BenchmarkFullName &case_info)=0
Finished a case of a benchmark.
virtual void measurement_succeeded(const measurer::Measurement &measurement)=0
Successfully finished a measurement.
IReporter()=default
Constructor.
virtual void experiment_finished(const clock::SystemTimePoint &time_stamp)=0
Finished an experiment.
virtual ~IReporter()=default
Destructor.
virtual void measurement_type_starts(const measurer::MeasurementType &type)=0
Start a measurement with a type.
virtual void measurement_failed(const BenchmarkFullName &case_info, const BenchmarkCondition &cond, const std::exception_ptr &error)=0
Failed a measurement.
virtual void experiment_starts(const clock::SystemTimePoint &time_stamp)=0
Start an experiment.
Definition of Measurement class.
Definition of MeasurementType class.
Namespace of reporters of results of benchmarks.
Namespace of stat_bench source codes.
Definition of SystemTimePoint class.