Kanzi Framework  3.9.0
Kanzi Engine 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

◆ NamedIntervalProfilerSampler()

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

◆ start()

void kanzi::NamedIntervalProfilerSampler::start ( )
inline

Starts measuring the time interval.

◆ stop()

void kanzi::NamedIntervalProfilerSampler::stop ( )
inline

Finishes measuring the time interval.

◆ getSampleData()

NamedIntervalProfilerSampleData kanzi::NamedIntervalProfilerSampler::getSampleData ( )
inline

Returns NamedIntervalProfilerSampleData sample including interval measurement data.

Returns
The measurement sample.

Member Data Documentation

◆ m_startTimePoint

TimePoint kanzi::NamedIntervalProfilerSampler::m_startTimePoint
protected

The point in time when interval measurement started.

◆ m_endTimePoint

TimePoint kanzi::NamedIntervalProfilerSampler::m_endTimePoint
protected

The point in time when interval measurement finished.

◆ m_scopeName

string kanzi::NamedIntervalProfilerSampler::m_scopeName
protected

The name of the measured code block.

◆ m_objectName

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: