24.02.1
|
Profiler class to collect benchmark numbers. More...
#include <Profiler.h>
Public Types | |
using | MeasurementsMap = std::map< std::string, std::vector< Measurement > > |
Mapping from instrument ids to their measurements. More... | |
Public Member Functions | |
void | add (std::unique_ptr< Instrument > instrument) |
Add instrument to the performance monitor. More... | |
void | test_start () |
Call test_start() on all the added instruments. More... | |
void | start () |
Call start() on all the added instruments. More... | |
void | stop () |
Call stop() on all the added instruments. More... | |
void | test_stop () |
Call test_stop() on all the added instruments. More... | |
const MeasurementsMap & | measurements () const |
Return measurements for all instruments. More... | |
const std::string & | header () const |
Return JSON formatted header data. More... | |
Profiler class to collect benchmark numbers.
A profiler manages multiple instruments that can collect different types of benchmarking numbers.
Definition at line 45 of file Profiler.h.
using MeasurementsMap = std::map<std::string, std::vector<Measurement> > |
Mapping from instrument ids to their measurements.
Definition at line 49 of file Profiler.h.
void add | ( | std::unique_ptr< Instrument > | instrument | ) |
Add instrument
to the performance monitor.
All added instruments will be used when start or stop are called to make measurements.
[in] | instrument | Instrument to be used to measure performance. |
Definition at line 35 of file Profiler.cpp.
Referenced by Framework::get_profiler().
const std::string & header | ( | ) | const |
Return JSON formatted header data.
Definition at line 94 of file Profiler.cpp.
const Profiler::MeasurementsMap & measurements | ( | ) | const |
Return measurements for all instruments.
Definition at line 89 of file Profiler.cpp.
Referenced by main().
void start | ( | ) |
Call start() on all the added instruments.
Called just before the run of the test starts
Definition at line 48 of file Profiler.cpp.
Referenced by main().
void stop | ( | ) |
Call stop() on all the added instruments.
Called just after the run of the test ends
Definition at line 56 of file Profiler.cpp.
Referenced by main().
void test_start | ( | ) |
Call test_start() on all the added instruments.
Called before the test set up starts
Definition at line 40 of file Profiler.cpp.
void test_stop | ( | ) |
Call test_stop() on all the added instruments.
Called after the test teardown ended
Definition at line 71 of file Profiler.cpp.