aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/InstrumentTests.cpp
diff options
context:
space:
mode:
authorNina Drozd <nina.drozd@arm.com>2018-09-27 11:53:34 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-10-10 16:16:57 +0100
commit2d9dd36fb6bc20b370701ab15463359b9db35f18 (patch)
treecc8dc033dd61ee4ec306201c50564a4f59cf79d9 /src/armnn/test/InstrumentTests.cpp
parent69851b525b9040ee7bf4b796efe74d473bc4e321 (diff)
downloadarmnn-2d9dd36fb6bc20b370701ab15463359b9db35f18.tar.gz
IVGCVSW-1821 - taking out scale factor again as it's polluting the WallClockTimer interface
Change-Id: Ia90b709ddfff321dbc218add4ab19737f68a44bf
Diffstat (limited to 'src/armnn/test/InstrumentTests.cpp')
-rw-r--r--src/armnn/test/InstrumentTests.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/armnn/test/InstrumentTests.cpp b/src/armnn/test/InstrumentTests.cpp
index 11d8414296..40ffde8801 100644
--- a/src/armnn/test/InstrumentTests.cpp
+++ b/src/armnn/test/InstrumentTests.cpp
@@ -13,7 +13,7 @@ using namespace armnn;
BOOST_AUTO_TEST_SUITE(Instruments)
-BOOST_AUTO_TEST_CASE(WallClockTimerInMilliseconds)
+BOOST_AUTO_TEST_CASE(WallClockTimerInMicroseconds)
{
WallClockTimer wallClockTimer;
@@ -22,16 +22,16 @@ BOOST_AUTO_TEST_CASE(WallClockTimerInMilliseconds)
// start the timer
wallClockTimer.Start();
- // wait for 10 milliseconds
- std::this_thread::sleep_for(std::chrono::milliseconds(10));
+ // wait for 10 microseconds
+ std::this_thread::sleep_for(std::chrono::microseconds(10));
// stop the timer
wallClockTimer.Stop();
BOOST_CHECK_EQUAL(wallClockTimer.GetMeasurements().front().m_Name, WallClockTimer::WALL_CLOCK_TIME);
- // check that WallClockTimer measurement should be >= 10 milliseconds
- BOOST_CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, std::chrono::milliseconds(10).count());
+ // check that WallClockTimer measurement should be >= 10 microseconds
+ BOOST_CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, std::chrono::microseconds(10).count());
}
BOOST_AUTO_TEST_CASE(WallClockTimerInNanoseconds)
@@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE(WallClockTimerInNanoseconds)
// start the timer
wallClockTimer.Start();
- // wait for 500 nanoseconds - 0.0005 milliseconds
+ // wait for 500 nanoseconds - 0.5 microseconds
std::this_thread::sleep_for(std::chrono::nanoseconds(500));
// stop the timer
@@ -51,11 +51,11 @@ BOOST_AUTO_TEST_CASE(WallClockTimerInNanoseconds)
BOOST_CHECK_EQUAL(wallClockTimer.GetMeasurements().front().m_Name, WallClockTimer::WALL_CLOCK_TIME);
- // delta is 0.0005 milliseconds
+ // delta is 0.5 microseconds
const auto delta =
- std::chrono::duration_cast<std::chrono::duration<double, std::milli>>(std::chrono::nanoseconds(500));
+ std::chrono::duration_cast<std::chrono::duration<double, std::micro>>(std::chrono::nanoseconds(500));
- // check that WallClockTimer measurement should be >= 0.0005 milliseconds
+ // check that WallClockTimer measurement should be >= 0.5 microseconds
BOOST_CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, delta.count());
}