ONE - On-device Neural Engine
Loading...
Searching...
No Matches
EventRecorder Class Reference

#include <EventRecorder.h>

Public Member Functions

 EventRecorder ()=default
 
void emit (std::unique_ptr< DurationEvent > &&evt)
 
void emit (const CounterEvent &evt)
 
const std::vector< std::unique_ptr< DurationEvent > > & duration_events () const
 
const std::vector< CounterEvent > & counter_events () const
 

Detailed Description

Definition at line 74 of file EventRecorder.h.

Constructor & Destructor Documentation

◆ EventRecorder()

EventRecorder::EventRecorder ( )
default

Member Function Documentation

◆ counter_events()

const std::vector< CounterEvent > & EventRecorder::counter_events ( ) const
inline

Definition at line 88 of file EventRecorder.h.

88{ return _counter_events; }

◆ duration_events()

const std::vector< std::unique_ptr< DurationEvent > > & EventRecorder::duration_events ( ) const
inline

Definition at line 84 of file EventRecorder.h.

85 {
86 return _duration_events;
87 }

◆ emit() [1/2]

void EventRecorder::emit ( const CounterEvent evt)

Definition at line 26 of file EventRecorder.cc.

27{
28 std::lock_guard<std::mutex> lock{_mu};
29
30 _counter_events.push_back(evt);
31}

◆ emit() [2/2]

void EventRecorder::emit ( std::unique_ptr< DurationEvent > &&  evt)

Definition at line 19 of file EventRecorder.cc.

20{
21 std::lock_guard<std::mutex> lock{_mu};
22
23 _duration_events.push_back(std::move(evt));
24}

Referenced by EventCollector::onEvent().


The documentation for this class was generated from the following files: