#include <Profiler.h>
profile session is a special singleton object which periodically writes log to a json file it is used inside ScopeProfiler to write time measurements. After application exit log can be viewed at chrome://tracing page
§ EndSession()
| void MxEngine::ProfileSession::EndSession |
( |
| ) |
|
ends profile measurement, writing json footer and saving json file to disk
§ GetEntryCount()
| size_t MxEngine::ProfileSession::GetEntryCount |
( |
| ) |
const |
getter for entriesCount
- Returns
- number of json entries
§ IsValid()
| bool MxEngine::ProfileSession::IsValid |
( |
| ) |
const |
checks if json file is opened
- Returns
- true if json file can be written to, false either
§ StartSession()
| void MxEngine::ProfileSession::StartSession |
( |
const MxString & |
filename | ) |
|
creates json file or clears it if it exists and writes json header to it
- Parameters
-
| filename | file to output json to |
§ WriteJsonEntry()
| void MxEngine::ProfileSession::WriteJsonEntry |
( |
const char * |
function, |
|
|
TimeStep |
begin, |
|
|
TimeStep |
delta |
|
) |
| |
writes json entry, consisting of process id, start/end time, function name
- Parameters
-
| function | called function name |
| begin | start timepoint of function execution |
| delta | duration of function execution |
The documentation for this class was generated from the following files:
- src/Utilities/Profiler/Profiler.h
- src/Utilities/Profiler/Profiler.cpp