aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/test/ProfilingTests.cpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-11-08 11:23:06 +0000
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-11-15 15:34:20 +0000
commitcdfb9417ddce28a5cbd33f8049a147168a26aa9b (patch)
tree925ebcb589cff2a118cd47dfbaf5d1a5daf058ea /src/profiling/test/ProfilingTests.cpp
parent34a407d4a95830ff9fad05e2bff34dcfc631c931 (diff)
downloadarmnn-cdfb9417ddce28a5cbd33f8049a147168a26aa9b.tar.gz
IVGCVSW-4073 Send stream info in the ConnectionAcknowledgedCommandHandler
* Added call to ISendTimelinePacket::SendStreamMetaDataPacket * Added call to ISendTimelinePacket::SendTimelineMessageDirectoryPackage * Added new StreamMetadataCommandHandler class to the mock Gatord service * Updated code and unit tests * Added include paths to the gatord mock target Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Ic6d200b513175884607b7c0563cbfa4942ff2fc6
Diffstat (limited to 'src/profiling/test/ProfilingTests.cpp')
-rw-r--r--src/profiling/test/ProfilingTests.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp
index 79a241b540..b197273dc5 100644
--- a/src/profiling/test/ProfilingTests.cpp
+++ b/src/profiling/test/ProfilingTests.cpp
@@ -22,6 +22,8 @@
#include <RequestCounterDirectoryCommandHandler.hpp>
#include <Runtime.hpp>
#include <SocketProfilingConnection.hpp>
+#include <SendCounterPacket.hpp>
+#include <SendTimelinePacket.hpp>
#include <armnn/Conversion.hpp>
@@ -128,8 +130,11 @@ BOOST_AUTO_TEST_CASE(CheckCommandHandler)
CounterDirectory counterDirectory;
MockBufferManager mockBuffer(1024);
SendCounterPacket sendCounterPacket(profilingStateMachine, mockBuffer);
+ SendTimelinePacket sendTimelinePacket(mockBuffer);
+
ConnectionAcknowledgedCommandHandler connectionAcknowledgedCommandHandler(0, 1, 4194304, counterDirectory,
- sendCounterPacket, profilingStateMachine);
+ sendCounterPacket, sendTimelinePacket,
+ profilingStateMachine);
CommandHandlerRegistry commandHandlerRegistry;
commandHandlerRegistry.RegisterFunctor(&connectionAcknowledgedCommandHandler);
@@ -1731,9 +1736,10 @@ BOOST_AUTO_TEST_CASE(CheckConnectionAcknowledged)
CounterDirectory counterDirectory;
MockBufferManager mockBuffer(1024);
SendCounterPacket sendCounterPacket(profilingState, mockBuffer);
+ SendTimelinePacket sendTimelinePacket(mockBuffer);
ConnectionAcknowledgedCommandHandler commandHandler(packetFamilyId, connectionPacketId, version, counterDirectory,
- sendCounterPacket, profilingState);
+ sendCounterPacket, sendTimelinePacket, profilingState);
// command handler received packet on ProfilingState::Uninitialised
BOOST_CHECK_THROW(commandHandler(packetA), armnn::Exception);
@@ -1759,7 +1765,8 @@ BOOST_AUTO_TEST_CASE(CheckConnectionAcknowledged)
profilingState.TransitionToState(ProfilingState::NotConnected);
profilingState.TransitionToState(ProfilingState::WaitingForAck);
ConnectionAcknowledgedCommandHandler differentCommandHandler(packetFamilyId, differentPacketId, version,
- counterDirectory, sendCounterPacket, profilingState);
+ counterDirectory, sendCounterPacket,
+ sendTimelinePacket, profilingState);
BOOST_CHECK_THROW(differentCommandHandler(packetB), armnn::Exception);
}