From ce2d9d13fbc0c8efd83dfb411c045553f87331f9 Mon Sep 17 00:00:00 2001 From: FinnWilliamsArm Date: Wed, 18 Sep 2019 10:28:16 +0100 Subject: IVGCVSW-3413 Add the Counters Metadata Signed-off-by: FinnWilliamsArm Change-Id: I1313320a28b2d17d1adbc80248882ef458c34a14 --- src/profiling/test/ProfilingTests.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/profiling/test') diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp index a5d60a512b..2a20aac8a4 100644 --- a/src/profiling/test/ProfilingTests.cpp +++ b/src/profiling/test/ProfilingTests.cpp @@ -535,13 +535,28 @@ BOOST_AUTO_TEST_CASE(CheckProfilingServiceEnabledRuntime) BOOST_CHECK(service.GetCurrentState() == ProfilingState::Uninitialised); service.Run(); BOOST_CHECK(service.GetCurrentState() == ProfilingState::Uninitialised); - service.m_Options.m_EnableProfiling = true; - service.Run(); + options.m_EnableProfiling = true; + service.ResetExternalProfilingOptions(options); BOOST_CHECK(service.GetCurrentState() == ProfilingState::NotConnected); service.Run(); BOOST_CHECK(service.GetCurrentState() == ProfilingState::WaitingForAck); } +BOOST_AUTO_TEST_CASE(CheckProfilingServiceCounterDirectory) +{ + armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + ProfilingService service(options); + + const ICounterDirectory& counterDirectory0 = service.GetCounterDirectory(); + BOOST_CHECK(counterDirectory0.GetCounterCount() == 0); + + options.m_EnableProfiling = true; + service.ResetExternalProfilingOptions(options); + + const ICounterDirectory& counterDirectory1 = service.GetCounterDirectory(); + BOOST_CHECK(counterDirectory1.GetCounterCount() != 0); +} + BOOST_AUTO_TEST_CASE(CheckProfilingObjectUids) { uint16_t uid = 0; -- cgit v1.2.1