diff options
author | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-07 17:33:54 +0000 |
---|---|---|
committer | Anthony Barbier <Anthony.barbier@arm.com> | 2018-11-08 14:19:59 +0000 |
commit | 72f4ae5a53fe24226ff16ed9c339171887d74874 (patch) | |
tree | d43c9b20a3420e0785bec0c4439763411439b891 /tests/framework/instruments/Instruments.h | |
parent | d2048ce58a88853cee6cdd67fe0d6f09c3e212b0 (diff) | |
download | ComputeLibrary-72f4ae5a53fe24226ff16ed9c339171887d74874.tar.gz |
COMPMID-1777: Add option to make instruments output timestamps instead of duration
Change-Id: Iafc1d6cd8003de64a3439ad807f4002036c73a73
Diffstat (limited to 'tests/framework/instruments/Instruments.h')
-rw-r--r-- | tests/framework/instruments/Instruments.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/framework/instruments/Instruments.h b/tests/framework/instruments/Instruments.h index 77c74b7b3e..370db8d4dc 100644 --- a/tests/framework/instruments/Instruments.h +++ b/tests/framework/instruments/Instruments.h @@ -54,6 +54,9 @@ enum class InstrumentType : unsigned int OPENCL_TIMER = 0x0400, SCHEDULER_TIMER = 0x0500, OPENCL_MEMORY_USAGE = 0x0600, + WALL_CLOCK_TIMESTAMPS = 0x0700, + OPENCL_TIMESTAMPS = 0x0800, + SCHEDULER_TIMESTAMPS = 0x0900, }; using InstrumentsDescription = std::pair<InstrumentType, ScaleFactor>; @@ -72,6 +75,22 @@ inline ::std::stringstream &operator<<(::std::stringstream &stream, InstrumentsD { switch(instrument.first) { + case InstrumentType::WALL_CLOCK_TIMESTAMPS: + switch(instrument.second) + { + case ScaleFactor::NONE: + stream << "WALL_CLOCK_TIMESTAMPS"; + break; + case ScaleFactor::TIME_MS: + stream << "WALL_CLOCK_TIMESTAMPS_MS"; + break; + case ScaleFactor::TIME_S: + stream << "WALL_CLOCK_TIMESTAMPS_S"; + break; + default: + throw std::invalid_argument("Unsupported instrument scale"); + } + break; case InstrumentType::WALL_CLOCK_TIMER: switch(instrument.second) { @@ -88,6 +107,22 @@ inline ::std::stringstream &operator<<(::std::stringstream &stream, InstrumentsD throw std::invalid_argument("Unsupported instrument scale"); } break; + case InstrumentType::SCHEDULER_TIMESTAMPS: + switch(instrument.second) + { + case ScaleFactor::NONE: + stream << "SCHEDULER_TIMESTAMPS"; + break; + case ScaleFactor::TIME_MS: + stream << "SCHEDULER_TIMESTAMPS_MS"; + break; + case ScaleFactor::TIME_S: + stream << "SCHEDULER_TIMESTAMPS_S"; + break; + default: + throw std::invalid_argument("Unsupported instrument scale"); + } + break; case InstrumentType::SCHEDULER_TIMER: switch(instrument.second) { @@ -142,6 +177,25 @@ inline ::std::stringstream &operator<<(::std::stringstream &stream, InstrumentsD throw std::invalid_argument("Unsupported instrument scale"); } break; + case InstrumentType::OPENCL_TIMESTAMPS: + switch(instrument.second) + { + case ScaleFactor::NONE: + stream << "OPENCL_TIMESTAMPS"; + break; + case ScaleFactor::TIME_US: + stream << "OPENCL_TIMESTAMPS_US"; + break; + case ScaleFactor::TIME_MS: + stream << "OPENCL_TIMESTAMPS_MS"; + break; + case ScaleFactor::TIME_S: + stream << "OPENCL_TIMESTAMPS_S"; + break; + default: + throw std::invalid_argument("Unsupported instrument scale"); + } + break; case InstrumentType::OPENCL_TIMER: switch(instrument.second) { |