24.02.1
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_TEST_PMU_COUNTER
25 #define ARM_COMPUTE_TEST_PMU_COUNTER
57 _scale_factor = 1000000;
65 std::string
id()
const override;
66 void start()
override;
71 PMU _pmu_cycles{ PERF_COUNT_HW_CPU_CYCLES };
72 PMU _pmu_instructions{ PERF_COUNT_HW_INSTRUCTIONS };
73 long long _cycles{ 0 };
74 long long _instructions{ 0 };
std::string id() const override
Identifier for the instrument.
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
void stop() override
Stop measuring.
Implementation of an instrument to count CPU cycles.
void start() override
Start measuring.
MeasurementsMap measurements() const override
Return the latest measurements.
Interface for classes that can be used to measure performance.
Copyright (c) 2017-2024 Arm Limited.
Class provides access to CPU hardware counters.
std::map< std::string, Measurement > MeasurementsMap
Map of measurements.
PMUCounter(ScaleFactor scale_factor)
Construct a PMU counter.