aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ProfilingService.cpp
diff options
context:
space:
mode:
authorFinnWilliamsArm <Finn.Williams@arm.com>2019-09-18 10:28:16 +0100
committerNarumol Prangnawarat <narumol.prangnawarat@arm.com>2019-09-23 11:07:30 +0000
commitce2d9d13fbc0c8efd83dfb411c045553f87331f9 (patch)
tree0fdfcc20b6ece5930df744b72f148bdc11aa4f6a /src/profiling/ProfilingService.cpp
parent480336906137587d020da987039cfd20ee4cc3a5 (diff)
downloadarmnn-ce2d9d13fbc0c8efd83dfb411c045553f87331f9.tar.gz
IVGCVSW-3413 Add the Counters Metadata
Signed-off-by: FinnWilliamsArm <Finn.Williams@arm.com> Change-Id: I1313320a28b2d17d1adbc80248882ef458c34a14
Diffstat (limited to 'src/profiling/ProfilingService.cpp')
-rw-r--r--src/profiling/ProfilingService.cpp39
1 files changed, 37 insertions, 2 deletions
diff --git a/src/profiling/ProfilingService.cpp b/src/profiling/ProfilingService.cpp
index eaaded54d0..4e613838c2 100644
--- a/src/profiling/ProfilingService.cpp
+++ b/src/profiling/ProfilingService.cpp
@@ -21,8 +21,27 @@ void ProfilingService::Initialise()
{
if (m_Options.m_EnableProfiling == true)
{
- // Setup Counter Directory - this should only be created if profiling is enabled
- // Setup Counter meta
+ // Setup provisional Counter Directory example - this should only be created if profiling is enabled
+ // Setup provisional Counter meta example
+ const std::string categoryName = "Category";
+
+ m_CounterDirectory.RegisterCategory(categoryName);
+ m_CounterDirectory.RegisterDevice("device name", 0, categoryName);
+ m_CounterDirectory.RegisterCounterSet("counterSet_name", 2, categoryName);
+
+ m_CounterDirectory.RegisterCounter(categoryName,
+ 0,
+ 1,
+ 123.45f,
+ "counter name 1",
+ "counter description");
+
+ m_CounterDirectory.RegisterCounter(categoryName,
+ 0,
+ 1,
+ 123.45f,
+ "counter name 2",
+ "counter description");
// For now until CounterDirectory setup is implemented, change m_State once everything initialised
m_State.TransitionToState(ProfilingState::NotConnected);
@@ -46,10 +65,26 @@ void ProfilingService::Run()
}
}
+const ICounterDirectory& ProfilingService::GetCounterDirectory() const
+{
+ return m_CounterDirectory;
+}
+
ProfilingState ProfilingService::GetCurrentState() const
{
return m_State.GetCurrentState();
}
+
+void ProfilingService::ResetExternalProfilingOptions(const Runtime::CreationOptions::ExternalProfilingOptions& options)
+{
+ if(!m_Options.m_EnableProfiling)
+ {
+ m_Options = options;
+ Initialise();
+ return;
+ }
+ m_Options = options;
+}
} // namespace profiling
} // namespace armnn \ No newline at end of file