aboutsummaryrefslogtreecommitdiff
path: root/tests/profiling/gatordmock/PeriodicCounterSelectionResponseHandler.hpp
diff options
context:
space:
mode:
authorColm Donelan <Colm.Donelan@arm.com>2019-10-16 12:24:20 +0100
committerColm Donelan <colm.donelan@arm.com>2019-10-17 15:59:55 +0000
commitb682d840bb0b4cc34f4febb69c2385feec880ae1 (patch)
tree155457d5c382deec0b45fd85a0609a4c3322613e /tests/profiling/gatordmock/PeriodicCounterSelectionResponseHandler.hpp
parent5ae78299f117a61c48a67c5381341501571a0b03 (diff)
downloadarmnn-b682d840bb0b4cc34f4febb69c2385feec880ae1.tar.gz
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 <Colm.Donelan@arm.com> Change-Id: I4accdbf6cf5dd3f7dcc12b210b8360b4a5e4e277
Diffstat (limited to 'tests/profiling/gatordmock/PeriodicCounterSelectionResponseHandler.hpp')
-rw-r--r--tests/profiling/gatordmock/PeriodicCounterSelectionResponseHandler.hpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/profiling/gatordmock/PeriodicCounterSelectionResponseHandler.hpp b/tests/profiling/gatordmock/PeriodicCounterSelectionResponseHandler.hpp
new file mode 100644
index 0000000000..e1172e2d68
--- /dev/null
+++ b/tests/profiling/gatordmock/PeriodicCounterSelectionResponseHandler.hpp
@@ -0,0 +1,42 @@
+//
+// Copyright © 2019 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#include "../../armnn/src/profiling/CommandHandlerFunctor.hpp"
+#include "../../armnn/src/profiling/Packet.hpp"
+
+#include <vector>
+
+namespace armnn
+{
+
+namespace gatordmock
+{
+
+#pragma once
+
+class PeriodicCounterSelectionResponseHandler : public profiling::CommandHandlerFunctor
+{
+
+public:
+ /**
+ *
+ * @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.
+ */
+ PeriodicCounterSelectionResponseHandler(uint32_t packetId, uint32_t version, bool quietOperation = true)
+ : CommandHandlerFunctor(packetId, version)
+ , m_QuietOperation(quietOperation)
+ {}
+
+ void operator()(const armnn::profiling::Packet& packet) override;
+
+private:
+ bool m_QuietOperation;
+};
+
+} // namespace gatordmock
+
+} // namespace armnn \ No newline at end of file