cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
stat_bench::reporter::DataFileReporterBase Class Referenceabstract

Base class to write data files. More...

#include <stat_bench/reporter/data_file_reporter_base.h>

+ Inheritance diagram for stat_bench::reporter::DataFileReporterBase:
+ Collaboration diagram for stat_bench::reporter::DataFileReporterBase:

Public Member Functions

 DataFileReporterBase (std::string file_path)
 Constructor.
 
void case_finished (const BenchmarkFullName &case_info) final
 Finished a case of a benchmark.
 
void case_starts (const BenchmarkFullName &case_info) final
 Start a case of a benchmark.
 
void experiment_finished (const clock::SystemTimePoint &time_stamp) final
 Finished an experiment.
 
void experiment_starts (const clock::SystemTimePoint &time_stamp) final
 Start an experiment.
 
void group_finished (const BenchmarkGroupName &name) final
 Finished a group of benchmarks.
 
void group_starts (const BenchmarkGroupName &name, const bench_impl::BenchmarkGroupConfig &config) final
 Start a group of benchmarks.
 
void measurement_failed (const BenchmarkFullName &case_info, const BenchmarkCondition &cond, const std::exception_ptr &error) final
 Failed a measurement.
 
void measurement_succeeded (const measurer::Measurement &measurement) final
 Successfully finished a measurement.
 
void measurer_finished (const measurer::MeasurerName &name) final
 Finished benchmarks using a measurer.
 
void measurer_starts (const measurer::MeasurerName &name) final
 Start benchmarks using a measurer.
 
virtual void write_data_file (const std::string &file_path, const data_file_spec::RootData &data)=0
 Write a data file.
 
- Public Member Functions inherited from stat_bench::reporter::IReporter
 IReporter (const IReporter &)=delete
 
 IReporter (IReporter &&)=delete
 
virtual ~IReporter ()=default
 Destructor.
 
auto operator= (const IReporter &) -> IReporter &=delete
 
auto operator= (IReporter &&) -> IReporter &=delete
 

Additional Inherited Members

- Protected Member Functions inherited from stat_bench::reporter::IReporter
 IReporter ()=default
 Constructor.
 

Detailed Description

Base class to write data files.

Definition at line 33 of file data_file_reporter_base.h.

Constructor & Destructor Documentation

◆ DataFileReporterBase()

stat_bench::reporter::DataFileReporterBase::DataFileReporterBase ( std::string file_path)
explicit

Constructor.

Parameters
[in]file_pathFile path.

Definition at line 33 of file data_file_reporter_base.cpp.

Member Function Documentation

◆ case_finished()

void stat_bench::reporter::DataFileReporterBase::case_finished ( const BenchmarkFullName & case_info)
finalvirtual

Finished a case of a benchmark.

Parameters
[in]case_infoInformation.

Implements stat_bench::reporter::IReporter.

Definition at line 73 of file data_file_reporter_base.cpp.

◆ case_starts()

void stat_bench::reporter::DataFileReporterBase::case_starts ( const BenchmarkFullName & case_info)
finalvirtual

Start a case of a benchmark.

Parameters
[in]case_infoInformation.

Implements stat_bench::reporter::IReporter.

Definition at line 69 of file data_file_reporter_base.cpp.

◆ experiment_finished()

void stat_bench::reporter::DataFileReporterBase::experiment_finished ( const clock::SystemTimePoint & time_stamp)
finalvirtual

Finished an experiment.

Parameters
[in]time_stampTime stamp.

Implements stat_bench::reporter::IReporter.

Definition at line 42 of file data_file_reporter_base.cpp.

◆ experiment_starts()

void stat_bench::reporter::DataFileReporterBase::experiment_starts ( const clock::SystemTimePoint & time_stamp)
finalvirtual

Start an experiment.

Parameters
[in]time_stampTime stamp.

Implements stat_bench::reporter::IReporter.

Definition at line 36 of file data_file_reporter_base.cpp.

◆ group_finished()

void stat_bench::reporter::DataFileReporterBase::group_finished ( const BenchmarkGroupName & name)
finalvirtual

Finished a group of benchmarks.

Parameters
[in]nameGroup name.

Implements stat_bench::reporter::IReporter.

Definition at line 65 of file data_file_reporter_base.cpp.

◆ group_starts()

void stat_bench::reporter::DataFileReporterBase::group_starts ( const BenchmarkGroupName & name,
const bench_impl::BenchmarkGroupConfig & config )
finalvirtual

Start a group of benchmarks.

Parameters
[in]nameGroup name.
[in]configConfiguration.

Implements stat_bench::reporter::IReporter.

Definition at line 60 of file data_file_reporter_base.cpp.

◆ measurement_failed()

void stat_bench::reporter::DataFileReporterBase::measurement_failed ( const BenchmarkFullName & case_info,
const BenchmarkCondition & cond,
const std::exception_ptr & error )
finalvirtual

Failed a measurement.

Parameters
[in]case_infoInformation of the case.
[in]condCondition.
[in]errorError.

Implements stat_bench::reporter::IReporter.

Definition at line 83 of file data_file_reporter_base.cpp.

◆ measurement_succeeded()

void stat_bench::reporter::DataFileReporterBase::measurement_succeeded ( const measurer::Measurement & measurement)
finalvirtual

Successfully finished a measurement.

Parameters
[in]measurementMeasurement.

Implements stat_bench::reporter::IReporter.

Definition at line 78 of file data_file_reporter_base.cpp.

◆ measurer_finished()

void stat_bench::reporter::DataFileReporterBase::measurer_finished ( const measurer::MeasurerName & name)
finalvirtual

Finished benchmarks using a measurer.

Parameters
[in]nameMeasurer name.

Implements stat_bench::reporter::IReporter.

Definition at line 55 of file data_file_reporter_base.cpp.

◆ measurer_starts()

void stat_bench::reporter::DataFileReporterBase::measurer_starts ( const measurer::MeasurerName & name)
finalvirtual

Start benchmarks using a measurer.

Parameters
[in]nameMeasurer name.

Implements stat_bench::reporter::IReporter.

Definition at line 50 of file data_file_reporter_base.cpp.

◆ write_data_file()

virtual void stat_bench::reporter::DataFileReporterBase::write_data_file ( const std::string & file_path,
const data_file_spec::RootData & data )
pure virtual

Write a data file.

Parameters
[in]file_pathFile path.
[in]dataData.

Implemented in stat_bench::reporter::CompressedMsgPackReporter, stat_bench::reporter::JsonReporter, and stat_bench::reporter::MsgPackReporter.


The documentation for this class was generated from the following files: