From c1536d69c1468514425e143b0578656f51598b94 Mon Sep 17 00:00:00 2001 From: David Monahan Date: Wed, 12 Feb 2020 15:52:35 +0000 Subject: IVGCVSW-4400 Backend Counter Registry Functionality * Adding BackendProfilingContext to the MockBackend * Made IBackendProfilingContext pure Virtual * Added UnitTest using MockBackend for testing Backend Counter Registration * Moved Registry of backend counters from Initialize() to AddBackendProfilingContext() * Added m_MaxGlobalCounterId to ProfilingService * Removed automatic registration of MockBack in BackendRegistry() Signed-off-by: David Monahan Change-Id: Ie1c6c31e56d1ac7079d6116ecad041961014aedc --- src/profiling/ProfilingService.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/profiling/ProfilingService.hpp') diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp index 27166b362e..54c6540f7e 100644 --- a/src/profiling/ProfilingService.hpp +++ b/src/profiling/ProfilingService.hpp @@ -67,10 +67,7 @@ public: // Store a profiling context returned from a backend that support profiling. void AddBackendProfilingContext(const BackendId backendId, - std::shared_ptr profilingContext) - { - m_BackendProfilingContexts.emplace(backendId, std::move(profilingContext)); - } + std::shared_ptr profilingContext); const ICounterDirectory& GetCounterDirectory() const; ICounterRegistry& GetCounterRegistry(); @@ -147,6 +144,7 @@ private: TimelinePacketWriterFactory m_TimelinePacketWriterFactory; std::unordered_map> m_BackendProfilingContexts; + uint16_t m_MaxGlobalCounterId; protected: // Default constructor/destructor kept protected for testing @@ -196,6 +194,7 @@ protected: m_PacketVersionResolver.ResolvePacketVersion(0, 5).GetEncodedValue(), m_StateMachine) , m_TimelinePacketWriterFactory(m_BufferManager) + , m_MaxGlobalCounterId(armnn::profiling::INFERENCES_RUN) { // Register the "Connection Acknowledged" command handler m_CommandHandlerRegistry.RegisterFunctor(&m_ConnectionAcknowledgedCommandHandler); -- cgit v1.2.1