#include <MockBackend.hpp>
Definition at line 29 of file MockBackend.hpp.
◆ MockBackendProfilingContext()
Definition at line 32 of file MockBackend.hpp.
33 : m_BackendProfiling(std::move(backendProfiling))
35 , m_IsTimelineEnabled(
true)
◆ ~MockBackendProfilingContext()
◆ ActivateCounters()
Optional<std::string> ActivateCounters |
( |
uint32_t |
capturePeriod, |
|
|
const std::vector< uint16_t > & |
counterIds |
|
) |
| |
|
inlinevirtual |
Implements IBackendProfilingContext.
Definition at line 65 of file MockBackend.hpp.
67 if (capturePeriod == 0 || counterIds.size() == 0)
69 m_ActiveCounters.clear();
71 else if (capturePeriod == 15939u)
75 m_CapturePeriod = capturePeriod;
76 m_ActiveCounters = counterIds;
◆ EnableProfiling()
bool EnableProfiling |
( |
bool |
| ) |
|
|
inlinevirtual |
Implements IBackendProfilingContext.
Definition at line 93 of file MockBackend.hpp.
95 auto sendTimelinePacket = m_BackendProfiling->GetSendTimelinePacket();
96 sendTimelinePacket->SendTimelineEntityBinaryPacket(4256);
97 sendTimelinePacket->Commit();
◆ EnableTimelineReporting()
bool EnableTimelineReporting |
( |
bool |
isEnabled | ) |
|
|
inlinevirtual |
◆ GetBackendProfiling()
◆ RegisterCounters()
uint16_t RegisterCounters |
( |
uint16_t |
currentMaxGlobalCounterId | ) |
|
|
inlinevirtual |
Implements IBackendProfilingContext.
Definition at line 45 of file MockBackend.hpp.
47 std::unique_ptr<profiling::IRegisterBackendCounters> counterRegistrar =
48 m_BackendProfiling->GetCounterRegistrationInterface(static_cast<uint16_t>(currentMaxGlobalCounterId));
50 std::string categoryName(
"MockCounters");
51 counterRegistrar->RegisterCategory(categoryName);
53 counterRegistrar->RegisterCounter(0, categoryName, 0, 0, 1.f,
"Mock Counter One",
"Some notional counter");
55 counterRegistrar->RegisterCounter(1, categoryName, 0, 0, 1.f,
"Mock Counter Two",
56 "Another notional counter");
58 std::string units(
"microseconds");
59 uint16_t nextMaxGlobalCounterId =
60 counterRegistrar->RegisterCounter(2, categoryName, 0, 0, 1.f,
"Mock MultiCore Counter",
61 "A dummy four core counter", units, 4);
62 return nextMaxGlobalCounterId;
◆ ReportCounterValues()
Implements IBackendProfilingContext.
Definition at line 80 of file MockBackend.hpp.
82 std::vector<profiling::CounterValue> counterValues;
84 for (
auto counterId : m_ActiveCounters)
86 counterValues.emplace_back(profiling::CounterValue{ counterId, counterId + 1u });
89 uint64_t timestamp = m_CapturePeriod;
90 return { profiling::Timestamp{ timestamp, counterValues } };
◆ TimelineReportingEnabled()
bool TimelineReportingEnabled |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: