24.02.1
|
Interface for classes that can be used to measure performance. More...
#include <Instrument.h>
Public Types | |
using | MeasurementsMap = std::map< std::string, Measurement > |
Map of measurements. More... | |
Public Member Functions | |
Instrument ()=default | |
Default constructor. More... | |
Instrument (const Instrument &)=default | |
Allow instances of this class to be copy constructed. More... | |
Instrument (Instrument &&)=default | |
Allow instances of this class to be move constructed. More... | |
Instrument & | operator= (const Instrument &)=default |
Allow instances of this class to be copied. More... | |
Instrument & | operator= (Instrument &&)=default |
Allow instances of this class to be moved. More... | |
virtual | ~Instrument ()=default |
Default destructor. More... | |
virtual std::string | id () const =0 |
Identifier for the instrument. More... | |
virtual void | test_start () |
Start of the test. More... | |
virtual void | start () |
Start measuring. More... | |
virtual void | stop () |
Stop measuring. More... | |
virtual void | test_stop () |
End of the test. More... | |
virtual MeasurementsMap | measurements () const |
Return the latest measurements. More... | |
virtual std::string | instrument_header () const |
Return JSON formatted instrument header string. More... | |
virtual MeasurementsMap | test_measurements () const |
Return the latest test measurements. More... | |
Static Public Member Functions | |
template<typename T , ScaleFactor scale> | |
static std::unique_ptr< Instrument > | make_instrument () |
Helper function to create an instrument of the given type. More... | |
Interface for classes that can be used to measure performance.
Definition at line 50 of file Instrument.h.
using MeasurementsMap = std::map<std::string, Measurement> |
Map of measurements.
Definition at line 109 of file Instrument.h.
|
default |
Default constructor.
|
default |
Allow instances of this class to be copy constructed.
|
default |
Allow instances of this class to be move constructed.
|
virtualdefault |
Default destructor.
|
pure virtual |
Identifier for the instrument.
Implemented in SchedulerClock< output_timestamps >, WallClock< output_timestamps >, PMUCounter, MaliCounter, OpenCLClock< output_timestamps >, and OpenCLMemoryUsage.
|
inlinevirtual |
Return JSON formatted instrument header string.
Reimplemented in SchedulerClock< output_timestamps >.
Definition at line 124 of file Instrument.h.
|
inlinestatic |
Helper function to create an instrument of the given type.
Definition at line 143 of file Instrument.h.
References arm_compute::test::validation::scale.
|
inlinevirtual |
Return the latest measurements.
Reimplemented in SchedulerClock< output_timestamps >, WallClock< output_timestamps >, PMUCounter, MaliCounter, OpenCLClock< output_timestamps >, and OpenCLMemoryUsage.
Definition at line 115 of file Instrument.h.
|
default |
Allow instances of this class to be copied.
|
default |
Allow instances of this class to be moved.
|
inlinevirtual |
Start measuring.
Called just before the run of the test starts
Reimplemented in SchedulerClock< output_timestamps >, WallClock< output_timestamps >, PMUCounter, MaliCounter, OpenCLClock< output_timestamps >, and OpenCLMemoryUsage.
Definition at line 89 of file Instrument.h.
|
inlinevirtual |
Stop measuring.
Called just after the run of the test ends
Reimplemented in WallClock< output_timestamps >, PMUCounter, MaliCounter, OpenCLClock< output_timestamps >, and OpenCLMemoryUsage.
Definition at line 97 of file Instrument.h.
|
inlinevirtual |
Return the latest test measurements.
Reimplemented in OpenCLClock< output_timestamps >, and OpenCLMemoryUsage.
Definition at line 133 of file Instrument.h.
|
inlinevirtual |
Start of the test.
Called before the test set up starts
Reimplemented in SchedulerClock< output_timestamps >, OpenCLClock< output_timestamps >, and OpenCLMemoryUsage.
Definition at line 81 of file Instrument.h.
|
inlinevirtual |
End of the test.
Called after the test teardown ended
Reimplemented in SchedulerClock< output_timestamps >, OpenCLClock< output_timestamps >, and OpenCLMemoryUsage.
Definition at line 105 of file Instrument.h.