diff options
author | Moritz Pflanzer <moritz.pflanzer@arm.com> | 2017-08-30 12:47:06 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 09e4f98e31a9bb77bebeccd59c70f0715ab2c292 (patch) | |
tree | dcf5992df5961042a221cb426372eeb21a2d8023 /tests/framework/instruments/Instrument.h | |
parent | 906443f38fe2c168f4a0b2db5cd9852865fc4922 (diff) | |
download | ComputeLibrary-09e4f98e31a9bb77bebeccd59c70f0715ab2c292.tar.gz |
COMPMID-482: Refactor PMU counters
Change-Id: I9b254ce693363ecbbd7c188d211c85471134a91e
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/84328
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/framework/instruments/Instrument.h')
-rw-r--r-- | tests/framework/instruments/Instrument.h | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/tests/framework/instruments/Instrument.h b/tests/framework/instruments/Instrument.h index 895a64738c..560bdf6a35 100644 --- a/tests/framework/instruments/Instrument.h +++ b/tests/framework/instruments/Instrument.h @@ -25,9 +25,10 @@ #define ARM_COMPUTE_TEST_INSTRUMENT #include "../Utils.h" +#include "Measurement.h" +#include <map> #include <memory> -#include <ostream> #include <string> namespace arm_compute @@ -47,20 +48,6 @@ public: template <typename T> static std::unique_ptr<Instrument> make_instrument(); - /** Struct representing measurement consisting of value and unit. */ - struct Measurement final - { - Measurement(double value, std::string unit) - : value{ value }, unit{ std::move(unit) } - { - } - - friend std::ostream &operator<<(std::ostream &os, const Measurement &measurement); - - double value; - std::string unit; - }; - Instrument() = default; Instrument(const Instrument &) = default; Instrument(Instrument &&) = default; @@ -77,16 +64,12 @@ public: /** Stop measuring. */ virtual void stop() = 0; + using MeasurementsMap = std::map<std::string, Measurement>; + /** Return the latest measurement. */ - virtual Measurement measurement() const = 0; + virtual MeasurementsMap measurements() const = 0; }; -inline std::ostream &operator<<(std::ostream &os, const Instrument::Measurement &measurement) -{ - os << measurement.value << measurement.unit; - return os; -} - template <typename T> inline std::unique_ptr<Instrument> Instrument::make_instrument() { |