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

#include <EventWriter.h>

Collaboration diagram for ChromeTracingWriter:

Public Member Functions

 ChromeTracingWriter (const std::string &filepath)
 
 ~ChromeTracingWriter ()
 
void flush (const std::vector< std::unique_ptr< EventRecorder > > &) override
 
- Public Member Functions inherited from EventFormatWriter
 EventFormatWriter (const std::string &filepath)
 
virtual ~EventFormatWriter ()
 

Additional Inherited Members

- Protected Attributes inherited from EventFormatWriter
std::ofstream _os
 

Detailed Description

Definition at line 53 of file EventWriter.h.

Constructor & Destructor Documentation

◆ ChromeTracingWriter()

ChromeTracingWriter::ChromeTracingWriter ( const std::string &  filepath)
inline

Definition at line 56 of file EventWriter.h.

56 : EventFormatWriter(filepath)
57 { /* empty */
58 }

◆ ~ChromeTracingWriter()

ChromeTracingWriter::~ChromeTracingWriter ( )
inline

Definition at line 59 of file EventWriter.h.

59{}

Member Function Documentation

◆ flush()

void ChromeTracingWriter::flush ( const std::vector< std::unique_ptr< EventRecorder > > &  recorders)
overridevirtual

Implements EventFormatWriter.

Definition at line 166 of file ChromeTracingEventWriter.cc.

167{
168 _os << "{\n";
169 _os << " " << quote("traceEvents") << ": [\n";
170
171 for (const auto &recorder : recorders)
172 {
173 flushOneRecord(*recorder);
174 }
175
176 _os << " { }\n";
177 _os << " ]\n";
178 _os << "}\n";
179}
std::ofstream _os
Definition EventWriter.h:39

References EventFormatWriter::_os.


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