diff options
author | Jim Flynn <jim.flynn@arm.com> | 2019-10-24 11:58:06 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2019-10-25 11:27:29 +0100 |
commit | 00f3aaf282c53b47f4cebfa4b29d7039da883bc1 (patch) | |
tree | 6ac1bf62f5c0cc442ddc77800ef44346185df16e /src/profiling/test | |
parent | c975f9295e076febd4ecd45c9174d54f7327b3cc (diff) | |
download | armnn-00f3aaf282c53b47f4cebfa4b29d7039da883bc1.tar.gz |
IVGCVSW-4027 Add the IProfilingGuidGenerator interface
Change-Id: Idfb80d73171aa2b57d4dcf01dc137817cf19d2bd
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/test')
-rw-r--r-- | src/profiling/test/SendTimelinePacketTests.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/profiling/test/SendTimelinePacketTests.cpp b/src/profiling/test/SendTimelinePacketTests.cpp index 6f90106cbe..4045d263fa 100644 --- a/src/profiling/test/SendTimelinePacketTests.cpp +++ b/src/profiling/test/SendTimelinePacketTests.cpp @@ -6,6 +6,7 @@ #include "SendCounterPacketTests.hpp" #include <BufferManager.hpp> +#include <ProfilingService.hpp> #include <ProfilingUtils.hpp> #include <SendTimelinePacket.hpp> #include <TimelinePacketWriterFactory.hpp> @@ -384,4 +385,22 @@ BOOST_AUTO_TEST_CASE(SendTimelinePacketTests3) armnn::RuntimeException); } +BOOST_AUTO_TEST_CASE(GetGuidsFromProfilingService) +{ + armnn::Runtime::CreationOptions::ExternalProfilingOptions options; + options.m_EnableProfiling = true; + ProfilingService& profilingService = ProfilingService::Instance(); + profilingService.ResetExternalProfilingOptions(options, true); + ProfilingStaticGuid staticGuid = profilingService.GenerateStaticId("dummy"); + // TODO when actual value gets generated verify its correctness + ProfilingStaticGuid expectedStaticValue(0); + BOOST_CHECK(staticGuid == expectedStaticValue); + ProfilingDynamicGuid dynamicGuid = profilingService.NextGuid(); + // TODO when actual value gets generated verify its correctness by verifying + // it is in the correct range i.e. > x and that if NextGuid is invoked + // again it is equal to the previous + 1 + ProfilingDynamicGuid expectedDynamicValue(0); + BOOST_CHECK(dynamicGuid == expectedDynamicValue); +} + BOOST_AUTO_TEST_SUITE_END() |