diff options
author | Jim Flynn <jim.flynn@arm.com> | 2020-05-26 21:10:49 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2020-05-27 15:05:25 +0000 |
commit | 1892d210d089cfbf355b44e32feb40bcb283ffc3 (patch) | |
tree | 28e53f6b63443b89cf6198f2e94af353d43e3aa6 /src/profiling/test/SendTimelinePacketTests.cpp | |
parent | 83fcf988cc1d5c9254a19258d6d67362c04bbaf4 (diff) | |
download | armnn-1892d210d089cfbf355b44e32feb40bcb283ffc3.tar.gz |
IVGCVSW-4735 Add label GUID to timeline eventClass message
Change-Id: Ie205d8146f5bb1920bf001b7623ead79e2ab9e48
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/test/SendTimelinePacketTests.cpp')
-rw-r--r-- | src/profiling/test/SendTimelinePacketTests.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/profiling/test/SendTimelinePacketTests.cpp b/src/profiling/test/SendTimelinePacketTests.cpp index 6d5bf490a8..05a6db8d1d 100644 --- a/src/profiling/test/SendTimelinePacketTests.cpp +++ b/src/profiling/test/SendTimelinePacketTests.cpp @@ -144,7 +144,9 @@ BOOST_AUTO_TEST_CASE(SendTimelineEntityWithEventClassPacketTest) sendTimelinePacket->SendTimelineEntityBinaryPacket(entityBinaryPacketProfilingGuid); const uint64_t eventClassBinaryPacketProfilingGuid = 789123u; - sendTimelinePacket->SendTimelineEventClassBinaryPacket(eventClassBinaryPacketProfilingGuid); + const uint64_t eventClassBinaryPacketNameGuid = 8845u; + sendTimelinePacket->SendTimelineEventClassBinaryPacket( + eventClassBinaryPacketProfilingGuid, eventClassBinaryPacketNameGuid); // Commit the messages sendTimelinePacket->Commit(); @@ -178,7 +180,7 @@ BOOST_AUTO_TEST_CASE(SendTimelineEntityWithEventClassPacketTest) uint32_t entityBinaryPacketDataLength = (entityBinaryPacketHeaderWord1 >> 0) & 0x00FFFFFF; BOOST_CHECK(entityBinaryPacketSequenceNumbered == 0); - BOOST_CHECK(entityBinaryPacketDataLength == 24); + BOOST_CHECK(entityBinaryPacketDataLength == 32); // Check the decl_id offset += uint32_t_size; @@ -203,6 +205,10 @@ BOOST_AUTO_TEST_CASE(SendTimelineEntityWithEventClassPacketTest) readProfilingGuid = ReadUint64(packetBuffer, offset); BOOST_CHECK(readProfilingGuid == eventClassBinaryPacketProfilingGuid); + offset += uint64_t_size; + uint64_t readEventClassNameGuid = ReadUint64(packetBuffer, offset); + BOOST_CHECK(readEventClassNameGuid == eventClassBinaryPacketNameGuid); + bufferManager.MarkRead(packetBuffer); } @@ -263,7 +269,9 @@ BOOST_AUTO_TEST_CASE(SendEventClassAfterTimelineEntityPacketTest) // Send TimelineEventClassBinaryPacket const uint64_t eventClassBinaryPacketProfilingGuid = 789123u; - sendTimelinePacket->SendTimelineEventClassBinaryPacket(eventClassBinaryPacketProfilingGuid); + const uint64_t eventClassBinaryPacketNameGuid = 8845u; + sendTimelinePacket->SendTimelineEventClassBinaryPacket( + eventClassBinaryPacketProfilingGuid, eventClassBinaryPacketNameGuid); // Commit the buffer sendTimelinePacket->Commit(); @@ -291,7 +299,7 @@ BOOST_AUTO_TEST_CASE(SendEventClassAfterTimelineEntityPacketTest) uint32_t eventClassBinaryPacketSequenceNumbered = (eventClassBinaryPacketHeaderWord1 >> 24) & 0x00000001; uint32_t eventClassBinaryPacketDataLength = (eventClassBinaryPacketHeaderWord1 >> 0) & 0x00FFFFFF; BOOST_CHECK(eventClassBinaryPacketSequenceNumbered == 0); - BOOST_CHECK(eventClassBinaryPacketDataLength == 12); + BOOST_CHECK(eventClassBinaryPacketDataLength == 20); offset += uint32_t_size; uint32_t eventClassDeclId = ReadUint32(packetBuffer, offset); @@ -302,6 +310,10 @@ BOOST_AUTO_TEST_CASE(SendEventClassAfterTimelineEntityPacketTest) readProfilingGuid = ReadUint64(packetBuffer, offset); BOOST_CHECK(readProfilingGuid == eventClassBinaryPacketProfilingGuid); + offset += uint64_t_size; + uint64_t readEventClassNameGuid = ReadUint64(packetBuffer, offset); + BOOST_CHECK(readEventClassNameGuid == eventClassBinaryPacketNameGuid); + bufferManager.MarkRead(packetBuffer); // Send TimelineEventBinaryPacket @@ -388,7 +400,9 @@ BOOST_AUTO_TEST_CASE(SendTimelinePacketTests3) // Send TimelineEventClassBinaryPacket const uint64_t eventClassBinaryPacketProfilingGuid = 789123u; - BOOST_CHECK_THROW(sendTimelinePacket->SendTimelineEventClassBinaryPacket(eventClassBinaryPacketProfilingGuid), + const uint64_t eventClassBinaryPacketNameGuid = 8845u; + BOOST_CHECK_THROW(sendTimelinePacket->SendTimelineEventClassBinaryPacket( + eventClassBinaryPacketProfilingGuid, eventClassBinaryPacketNameGuid), armnn::RuntimeException); } |