Kanzi 3.9.10
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.
 
 NamedIntervalProfilerSampler (string_view scopeName, string_view objectName)
 Constructs the sampler object.
 
void start ()
 Starts measuring the time interval.
 
void stop ()
 Finishes measuring the time interval.
 

Protected Attributes

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

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: