aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingService.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profiling/ProfilingService.hpp')
-rw-r--r--src/profiling/ProfilingService.hpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/profiling/ProfilingService.hpp b/src/profiling/ProfilingService.hpp
index 7919c3019a..efad871c8c 100644
--- a/src/profiling/ProfilingService.hpp
+++ b/src/profiling/ProfilingService.hpp
@@ -50,7 +50,9 @@ public:
using BackendProfilingContext = std::unordered_map<std::string,
std::shared_ptr<IBackendProfilingContext>>;
- ProfilingService(armnn::Optional<IReportStructure&> reportStructure = armnn::EmptyOptional())
+ ProfilingService(uint16_t maxGlobalCounterId,
+ IInitialiseProfilingService& initialiser,
+ armnn::Optional<IReportStructure&> reportStructure = armnn::EmptyOptional())
: m_Options()
, m_TimelineReporting(false)
, m_CounterDirectory()
@@ -118,8 +120,9 @@ public:
m_StateMachine,
*this)
, m_TimelinePacketWriterFactory(m_BufferManager)
- , m_MaxGlobalCounterId(INFERENCES_RUN)
+ , m_MaxGlobalCounterId(maxGlobalCounterId)
, m_ServiceActive(false)
+ , m_Initialiser(initialiser)
{
// Register the "Connection Acknowledged" command handler
m_CommandHandlerRegistry.RegisterFunctor(&m_ConnectionAcknowledgedCommandHandler);
@@ -151,7 +154,7 @@ public:
void Update();
// Disconnects the profiling service from the external server
- void Disconnect();
+ void Disconnect() override;
// Store a profiling context returned from a backend that support profiling.
void AddBackendProfilingContext(const std::string& backendId,
@@ -170,6 +173,8 @@ public:
// counter global/backend mapping functions
const ICounterMappings& GetCounterMappings() const override;
IRegisterCounterMapping& GetCounterMappingRegistry() override;
+ bool IsCategoryRegistered(const std::string& categoryName) const override;
+ bool IsCounterRegistered(const std::string& counterName) const override;
// Getters for the profiling service state
bool IsProfilingEnabled() const override;
@@ -185,6 +190,8 @@ public:
uint32_t SubtractCounterValue(uint16_t counterUid, uint32_t value) override;
uint32_t IncrementCounterValue(uint16_t counterUid) override;
+ void InitializeCounterValue(uint16_t counterUid) override;
+
std::unique_ptr<ISendTimelinePacket> GetSendTimelinePacket() const override;
ISendCounterPacket& GetSendCounterPacket() override
@@ -211,7 +218,6 @@ private:
// Initialization/reset functions
void Initialize();
- void InitializeCounterValue(uint16_t counterUid);
void Reset();
void Stop();
@@ -256,6 +262,8 @@ private:
std::condition_variable m_ServiceActiveConditionVariable;
bool m_ServiceActive;
+ IInitialiseProfilingService& m_Initialiser;
+
protected:
// Protected methods for testing