15 std::vector<InstrumentPtr>&& instruments,
17 : m_EventName(eventName)
18 , m_Profiler(profiler)
20 , m_BackendId(backendId)
21 , m_Instruments(
std::move(instruments))
22 , m_ProfilingGuid(guid)
27 : m_EventName(std::move(other.m_EventName))
28 , m_Profiler(other.m_Profiler)
29 , m_Parent(other.m_Parent)
30 , m_BackendId(other.m_BackendId)
31 , m_Instruments(std::move(other.m_Instruments))
32 , m_ProfilingGuid(other.m_ProfilingGuid)
42 for (
auto& instrument : m_Instruments)
50 for (
auto& instrument : m_Instruments)
58 std::vector<Measurement> measurements;
59 for (
auto& instrument : m_Instruments)
61 for (
auto& measurement : instrument->GetMeasurements())
63 measurements.emplace_back(std::move(measurement));
96 return m_ProfilingGuid;
107 m_EventName = other.m_EventName;
108 m_Profiler = other.m_Profiler;
109 m_Parent = other.m_Parent;
110 m_BackendId = other.m_BackendId;
111 m_ProfilingGuid = other.m_ProfilingGuid;
112 other.m_Profiler =
nullptr;
113 other.m_Parent =
nullptr;
Event class records measurements reported by BeginEvent()/EndEvent() and returns measurements when Ev...
void Start()
Start the Event.
const Event * GetParentEvent() const
Get the pointer of the parent event.
void Stop()
Stop the Event.
const IProfiler * GetProfiler() const
Get the pointer of the profiler associated with this event.
const std::string & GetName() const
Get the name of the event.
Event(const std::string &eventName, IProfiler *profiler, Event *parent, const BackendId backendId, std::vector< InstrumentPtr > &&instrument, const Optional< arm::pipe::ProfilingGuid > guid)
Optional< arm::pipe::ProfilingGuid > GetProfilingGuid() const
Get the associated profiling GUID if the event is a workload.
BackendId GetBackendId() const
Get the backend id of the event.
const std::vector< Measurement > GetMeasurements() const
Get the recorded measurements calculated between Start() and Stop()
Event & operator=(const Event &other)=delete
Assignment operator.
const std::vector< InstrumentPtr > & GetInstruments() const
Get the Instruments used by this Event.
~Event() noexcept
Destructor.
Copyright (c) 2021 ARM Limited and Contributors.