From fe5a24beeef6e9a41366e694f41093565e748048 Mon Sep 17 00:00:00 2001 From: Finn Williams Date: Thu, 9 Apr 2020 16:05:28 +0100 Subject: IVGCVSW-4666 Call EnableProfiling when state switches to active * Move the call to EnableProfiling() into ConnectionAcknowledgedHandler * Fix an issue with MockGatord forcing some command handlers to be quiet * Add some small unrelated improvements and typo fixes to the periodic counter command handlers Signed-off-by: Finn Williams Change-Id: I9e6066b78d1f782cfaf27c11571c0ec5cb5d126f --- src/backends/backendsCommon/test/MockBackend.hpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/backends') diff --git a/src/backends/backendsCommon/test/MockBackend.hpp b/src/backends/backendsCommon/test/MockBackend.hpp index e1570ff920..d90ad798da 100644 --- a/src/backends/backendsCommon/test/MockBackend.hpp +++ b/src/backends/backendsCommon/test/MockBackend.hpp @@ -45,18 +45,19 @@ public: uint16_t RegisterCounters(uint16_t currentMaxGlobalCounterId) { std::unique_ptr counterRegistrar = - m_BackendProfiling->GetCounterRegistrationInterface(currentMaxGlobalCounterId); + m_BackendProfiling->GetCounterRegistrationInterface(static_cast(currentMaxGlobalCounterId)); std::string categoryName("MockCounters"); counterRegistrar->RegisterCategory(categoryName); - uint16_t nextMaxGlobalCounterId = - counterRegistrar->RegisterCounter(0, categoryName, 0, 0, 1.f, "Mock Counter One", "Some notional counter"); - nextMaxGlobalCounterId = counterRegistrar->RegisterCounter(1, categoryName, 0, 0, 1.f, "Mock Counter Two", + counterRegistrar->RegisterCounter(0, categoryName, 0, 0, 1.f, "Mock Counter One", "Some notional counter"); + + counterRegistrar->RegisterCounter(1, categoryName, 0, 0, 1.f, "Mock Counter Two", "Another notional counter"); std::string units("microseconds"); - nextMaxGlobalCounterId = counterRegistrar->RegisterCounter(2, categoryName, 0, 0, 1.f, "Mock MultiCore Counter", + uint16_t nextMaxGlobalCounterId = + counterRegistrar->RegisterCounter(2, categoryName, 0, 0, 1.f, "Mock MultiCore Counter", "A dummy four core counter", units, 4); return nextMaxGlobalCounterId; } @@ -91,6 +92,9 @@ public: bool EnableProfiling(bool) { + auto sendTimelinePacket = m_BackendProfiling->GetSendTimelinePacket(); + sendTimelinePacket->SendTimelineEntityBinaryPacket(4256); + sendTimelinePacket->Commit(); return true; } -- cgit v1.2.1