kanzi::MainLoopTaskProfilerSampleData Struct Reference

The main loop task profiler data sample. More...

#include <kanzi/core/profiling/main_loop_profiler_sample.hpp>

Inheritance diagram for kanzi::MainLoopTaskProfilerSampleData:
kanzi::IntervalProfilerSampleData

Public Member Functions

 MainLoopTaskProfilerSampleData (chrono::high_resolution_clock::time_point startPoint, chrono::nanoseconds timeSpent, size_t counter)
 Use this constructor when you need to initialize main loop counter with custom value. More...
 
- Public Member Functions inherited from kanzi::IntervalProfilerSampleData
 IntervalProfilerSampleData (chrono::high_resolution_clock::time_point startTimePoint, chrono::nanoseconds duration)
 Constructor. More...
 

Public Attributes

size_t m_mainLoopCounter
 Main loop counter value. More...
 
- Public Attributes inherited from kanzi::IntervalProfilerSampleData
chrono::high_resolution_clock::time_point m_startTimePoint
 The point in time when interval measurement started. More...
 
chrono::nanoseconds m_duration
 The duration of the interval. More...
 

Detailed Description

The main loop task profiler data sample.

Use Profiling macros to profile main loop tasks.

This structure extends IntervalProfilerSampleData with main loop counter value. Use this structure to profile main loop tasks when you want to identify each sample with the value of the main loop counter at the time the sample was collected. To profile the execution time of the main loop task create a sample object of MainLoopTaskProfilerSampleData structure and call the #start() method at the beginning of the task. At the end of the task call #stop() and pass the sample to the #MainLoopTaskProfiler object.

Constructor & Destructor Documentation

kanzi::MainLoopTaskProfilerSampleData::MainLoopTaskProfilerSampleData ( chrono::high_resolution_clock::time_point  startPoint,
chrono::nanoseconds  timeSpent,
size_t  counter 
)
inlineexplicit

Use this constructor when you need to initialize main loop counter with custom value.

Parameters
mainLoopCounterInitial main loop counter value.

Member Data Documentation

size_t kanzi::MainLoopTaskProfilerSampleData::m_mainLoopCounter

Main loop counter value.

Note that the value is not constant because it can be set after the sample object is created.


The documentation for this struct was generated from the following file: