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/WallClockTimer.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/WallClockTimer.h')
-rw-r--r-- | tests/framework/instruments/WallClockTimer.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/framework/instruments/WallClockTimer.h b/tests/framework/instruments/WallClockTimer.h index c9829aea12..d659ab1a80 100644 --- a/tests/framework/instruments/WallClockTimer.h +++ b/tests/framework/instruments/WallClockTimer.h @@ -35,14 +35,15 @@ namespace test namespace framework { /** Implementation of an instrument to measure elapsed wall-clock time in milliseconds. */ -class WallClockTimer : public Instrument +template <bool output_timestamps> +class WallClock : public Instrument { public: /** Construct a Wall clock timer. * * @param[in] scale_factor Measurement scale factor. */ - WallClockTimer(ScaleFactor scale_factor) + WallClock(ScaleFactor scale_factor) { switch(scale_factor) { @@ -73,6 +74,9 @@ private: std::chrono::high_resolution_clock::time_point _stop{}; float _scale_factor{}; }; + +using WallClockTimer = WallClock<false>; +using WallClockTimestamps = WallClock<true>; } // namespace framework } // namespace test } // namespace arm_compute |