diff options
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() { |