Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::NamedIntervalProfilerSampler Class Reference

This sampler collects interval measurement to produce NamedIntervalProfilerSampleData sample. More...

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

Public Member Functions

NamedIntervalProfilerSampleData getSampleData ()
 Returns NamedIntervalProfilerSampleData sample including interval measurement data. More...
 
 NamedIntervalProfilerSampler (string_view scopeName, string_view objectName)
 Constructs the sampler object. More...
 
void start ()
 Starts measuring the time interval. More...
 
void stop ()
 Finishes measuring the time interval. More...
 

Protected Attributes

TimePoint m_endTimePoint
 The point in time when interval measurement finished. More...
 
string m_objectName
 The name of the object that the code block is operating on. More...
 
string m_scopeName
 The name of the measured code block. More...
 
TimePoint m_startTimePoint
 The point in time when interval measurement started. More...
 

Detailed Description

This sampler collects interval measurement to produce NamedIntervalProfilerSampleData sample.

The ProfilingScopeHelper uses sampler class to measure time spent executing scope which is profiled.

For information on how the sampler is used in scope profiling, See ProfilingScopeHelper.

Constructor & Destructor Documentation

kanzi::NamedIntervalProfilerSampler::NamedIntervalProfilerSampler ( string_view  scopeName,
string_view  objectName 
)
inlineexplicit

Constructs the sampler object.

Parameters
scopeNameThe name of the measure scope.
objectNameThe name of the object that the scope is operating on.

Member Function Documentation

void kanzi::NamedIntervalProfilerSampler::start ( )
inline

Starts measuring the time interval.

void kanzi::NamedIntervalProfilerSampler::stop ( )
inline

Finishes measuring the time interval.

NamedIntervalProfilerSampleData kanzi::NamedIntervalProfilerSampler::getSampleData ( )
inline

Returns NamedIntervalProfilerSampleData sample including interval measurement data.

Returns
The measurement sample.

Member Data Documentation

TimePoint kanzi::NamedIntervalProfilerSampler::m_startTimePoint
protected

The point in time when interval measurement started.

TimePoint kanzi::NamedIntervalProfilerSampler::m_endTimePoint
protected

The point in time when interval measurement finished.

string kanzi::NamedIntervalProfilerSampler::m_scopeName
protected

The name of the measured code block.

string kanzi::NamedIntervalProfilerSampler::m_objectName
protected

The name of the object that the code block is operating on.


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