Class that creates a JSON file with the time of execution of each function, files can be open at chrome://tracing/. More...
#include <Profiler.hpp>
Public Member Functions | |
Profiler () | |
Creates the Profiler object. More... | |
void | BeginSession (const std::string &name) |
Starts the Profiler output file. More... | |
void | EndSession () |
Ends the Profiler output file. More... | |
void | WriteProfile (const ProfileResult &result) |
Starts the Profiler output file. More... | |
void | WriteHeader () |
Writes the header file for the JSON-file. More... | |
void | WriteFooter () |
Writes the footer file for the JSON-file. More... | |
Static Public Member Functions | |
static Profiler & | Get () |
Gets the Profiler instance. More... | |
Private Attributes | |
InstrumentationSession * | m_CurrentSession |
The name of the function to be Profile. More... | |
std::ofstream | m_OutputStream |
The output JSON file where data is written. More... | |
int | m_ProfileCount |
Counter for array separator. More... | |
Class that creates a JSON file with the time of execution of each function, files can be open at chrome://tracing/.
|
inline |
Creates the Profiler object.
|
inline |
Starts the Profiler output file.
name | Name o the function to be timed. |
|
inline |
Ends the Profiler output file.
|
inline |
Writes the footer file for the JSON-file.
|
inline |
Writes the header file for the JSON-file.
|
inline |
Starts the Profiler output file.
result | Structure that contains the profiler results. |
|
private |
The name of the function to be Profile.
|
private |
The output JSON file where data is written.
|
private |
Counter for array separator.