From b682d840bb0b4cc34f4febb69c2385feec880ae1 Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Wed, 16 Oct 2019 12:24:20 +0100 Subject: IVGCVSW-3721 Add support for startup sequence (Mock Gatord service). * Updated ExecuteNetwork to propagate a configured Runtime down to RunTest. * Fixed the creation of PeriodicCounterCaptureCommandHandler to match other handlers. * Moved around some printouts to make the MockGatorD output more useful. * Added details to the exception handling for problems in the GatordMockService receive thread. * Mockutils::ConstructHeader is only used in GatordMockTests. Moved it in there and deleted MockUtils.hpp * Refactored SendPeriodicCounterSelectionList to use ProfilingUtils. * Added PeriodicCounterSelectionResponseHandler to received packet echoed back. Signed-off-by: Colm Donelan Change-Id: I4accdbf6cf5dd3f7dcc12b210b8360b4a5e4e277 --- .../PeriodicCounterCaptureCommandHandler.hpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'tests/profiling/gatordmock/PeriodicCounterCaptureCommandHandler.hpp') diff --git a/tests/profiling/gatordmock/PeriodicCounterCaptureCommandHandler.hpp b/tests/profiling/gatordmock/PeriodicCounterCaptureCommandHandler.hpp index 7d6471bf91..b2fd48f4e8 100644 --- a/tests/profiling/gatordmock/PeriodicCounterCaptureCommandHandler.hpp +++ b/tests/profiling/gatordmock/PeriodicCounterCaptureCommandHandler.hpp @@ -7,6 +7,7 @@ #include #include +#include "../../armnn/src/profiling/Packet.hpp" #include @@ -27,11 +28,15 @@ class PeriodicCounterCaptureCommandHandler : public profiling::CommandHandlerFun { public: - PeriodicCounterCaptureCommandHandler(uint32_t packetId, - uint32_t version, - bool echoPackets) + /** + * + * @param packetId The id of packets this handler will process. + * @param version The version of that id. + * @param quietOperation Optional parameter to turn off printouts. This is useful for unittests. + */ + PeriodicCounterCaptureCommandHandler(uint32_t packetId, uint32_t version, bool quietOperation = false) : CommandHandlerFunctor(packetId, version) - , m_EchoPackets(echoPackets) + , m_QuietOperation(quietOperation) {} void operator()(const armnn::profiling::Packet& packet) override; @@ -46,9 +51,9 @@ private: uint64_t m_FirstTimestamp = 0, m_SecondTimestamp = 0; bool m_HeaderPrinted = false; - bool m_EchoPackets; + bool m_QuietOperation; }; -} // namespace gatordmock +} // namespace gatordmock -} // namespace armnn +} // namespace armnn -- cgit v1.2.1