diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-09-05 12:02:04 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-09-09 16:47:50 +0000 |
commit | 149528e88c081e71fc7ec78e0c301eb2e487adfc (patch) | |
tree | a287157d725f3186c44f9c8f71141cd694333249 /src/profiling/test | |
parent | a85e215dd1b027c5ef88621d1b4d5f6e078605da (diff) | |
download | armnn-149528e88c081e71fc7ec78e0c301eb2e487adfc.tar.gz |
IVGCVSW-3691 Basic refactoring in view of upcoming work in the profiler
Change-Id: Iea4550b864fc2adb04a3a2411a7ead06b1f60ab9
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Diffstat (limited to 'src/profiling/test')
-rw-r--r-- | src/profiling/test/SendCounterPacketTests.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/profiling/test/SendCounterPacketTests.cpp b/src/profiling/test/SendCounterPacketTests.cpp index 5309560c88..626a5a6589 100644 --- a/src/profiling/test/SendCounterPacketTests.cpp +++ b/src/profiling/test/SendCounterPacketTests.cpp @@ -68,7 +68,7 @@ public: memcpy(buffer, message.c_str(), static_cast<unsigned int>(message.size()) + 1); } - void SendCounterDirectoryPacket(const Category& category, const std::vector<Counter>& counters) override + void SendCounterDirectoryPacket(const CounterDirectory& counterDirectory) override { std::string message("SendCounterDirectoryPacket"); unsigned int reserved = 0; @@ -114,9 +114,8 @@ BOOST_AUTO_TEST_CASE(MockSendCounterPacketTest) BOOST_TEST(strcmp(buffer, "SendStreamMetaDataPacket") == 0); - Category category; - std::vector<Counter> counters; - sendCounterPacket.SendCounterDirectoryPacket(category, counters); + CounterDirectory counterDirectory(1, "counter_directory", 0, 0, 0); + sendCounterPacket.SendCounterDirectoryPacket(counterDirectory); BOOST_TEST(strcmp(buffer, "SendCounterDirectoryPacket") == 0); @@ -144,7 +143,7 @@ BOOST_AUTO_TEST_CASE(SendPeriodicCounterSelectionPacketTest) uint32_t capturePeriod = 1000; std::vector<uint16_t> selectedCounterIds; BOOST_CHECK_THROW(sendPacket1.SendPeriodicCounterSelectionPacket(capturePeriod, selectedCounterIds), - armnn::RuntimeException); + armnn::profiling::BufferExhaustion); // Packet without any counters MockBuffer mockBuffer2(512); @@ -284,7 +283,7 @@ BOOST_AUTO_TEST_CASE(SendStreamMetaDataPacketTest) // Error no space left in buffer MockBuffer mockBuffer1(10); SendCounterPacket sendPacket1(mockBuffer1); - BOOST_CHECK_THROW(sendPacket1.SendStreamMetaDataPacket(), armnn::RuntimeException); + BOOST_CHECK_THROW(sendPacket1.SendStreamMetaDataPacket(), armnn::profiling::BufferExhaustion); // Full metadata packet |