diff options
author | Jim Flynn <jim.flynn@arm.com> | 2019-10-15 10:18:11 +0100 |
---|---|---|
committer | Jim Flynn Arm <jim.flynn@arm.com> | 2019-10-15 14:43:37 +0000 |
commit | 672d06eac5b0842c22f9f219e9b65efcd5883d33 (patch) | |
tree | 7961c81d0073d9e49491c26e67586cfa1a0aae6c /src/profiling/test/ProfilingTests.cpp | |
parent | 062e0e95a4332430efa7b0d5af3aab7a5b45a2dc (diff) | |
download | armnn-672d06eac5b0842c22f9f219e9b65efcd5883d33.tar.gz |
IVGCVSW-3948 Add Startup method to Profiling
Change-Id: I591e84048775278bfc728e1b0c189ff4cf2d350b
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/test/ProfilingTests.cpp')
-rw-r--r-- | src/profiling/test/ProfilingTests.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp index 033f64ae24..b32a55cc6d 100644 --- a/src/profiling/test/ProfilingTests.cpp +++ b/src/profiling/test/ProfilingTests.cpp @@ -3137,4 +3137,31 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceGoodPerJobCounterSelectionPacket) profilingService.ResetExternalProfilingOptions(options, true); } +BOOST_AUTO_TEST_CASE(CheckConfigureProfilingServiceOn) +{ + armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + options.m_EnableProfiling = true; + ProfilingService& profilingService = ProfilingService::Instance(); + BOOST_CHECK(profilingService.GetCurrentState() == ProfilingState::Uninitialised); + profilingService.ConfigureProfilingService(options); + // should get as far as NOT_CONNECTED + BOOST_CHECK(profilingService.GetCurrentState() == ProfilingState::NotConnected); + // Reset the profiling service to stop any running thread + options.m_EnableProfiling = false; + profilingService.ResetExternalProfilingOptions(options, true); +} + +BOOST_AUTO_TEST_CASE(CheckConfigureProfilingServiceOff) +{ + armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + ProfilingService& profilingService = ProfilingService::Instance(); + BOOST_CHECK(profilingService.GetCurrentState() == ProfilingState::Uninitialised); + profilingService.ConfigureProfilingService(options); + // should not move from Uninitialised + BOOST_CHECK(profilingService.GetCurrentState() == ProfilingState::Uninitialised); + // Reset the profiling service to stop any running thread + options.m_EnableProfiling = false; + profilingService.ResetExternalProfilingOptions(options, true); +} + BOOST_AUTO_TEST_SUITE_END() |