Kea  1.5.0
Methods are used by data producers.

The following methods are used by data producers: More...

Functions

void isc::stats::StatsMgr::addValue (const std::string &name, const double value)
 Records incremental floating point observation. More...
 
void isc::stats::StatsMgr::addValue (const std::string &name, const int64_t value)
 Records incremental integer observation. More...
 
void isc::stats::StatsMgr::addValue (const std::string &name, const StatsDuration &value)
 Records incremental duration observation. More...
 
void isc::stats::StatsMgr::addValue (const std::string &name, const std::string &value)
 Records incremental string observation. More...
 
void isc::stats::StatsMgr::setMaxSampleAge (const std::string &name, const StatsDuration &duration)
 Determines maximum age of samples. More...
 
void isc::stats::StatsMgr::setMaxSampleCount (const std::string &name, uint32_t max_samples)
 Determines how many samples of a given statistic should be kept. More...
 
void isc::stats::StatsMgr::setValue (const std::string &name, const double value)
 Records absolute floating point observation. More...
 
void isc::stats::StatsMgr::setValue (const std::string &name, const int64_t value)
 Records absolute integer observation. More...
 
void isc::stats::StatsMgr::setValue (const std::string &name, const StatsDuration &value)
 Records absolute duration observation. More...
 
void isc::stats::StatsMgr::setValue (const std::string &name, const std::string &value)
 Records absolute string observation. More...
 

Detailed Description

The following methods are used by data producers:

Function Documentation

◆ addValue() [1/4]

void isc::stats::StatsMgr::addValue ( const std::string &  name,
const double  value 
)

Records incremental floating point observation.

Parameters
namename of the observation
valuefloating point value observed
Exceptions
InvalidStatTypeif statistic is not fp

Definition at line 50 of file stats_mgr.cc.

References isc::stats::StatsMgr::addValueInternal().

+ Here is the call graph for this function:

◆ addValue() [2/4]

void isc::stats::StatsMgr::addValue ( const std::string &  name,
const int64_t  value 
)

Records incremental integer observation.

Parameters
namename of the observation
valueinteger value observed
Exceptions
InvalidStatTypeif statistic is not integer

Definition at line 46 of file stats_mgr.cc.

References isc::stats::StatsMgr::addValueInternal().

Referenced by isc::ha::HAImpl::buffer4Receive(), isc::ha::HAImpl::buffer6Receive(), isc::dhcp::Dhcpv4Srv::processPacket(), isc::dhcp::Dhcpv4Srv::processStatsReceived(), and isc::dhcp::Dhcpv4Srv::processStatsSent().

+ Here is the call graph for this function:

◆ addValue() [3/4]

void isc::stats::StatsMgr::addValue ( const std::string &  name,
const StatsDuration value 
)

Records incremental duration observation.

Parameters
namename of the observation
valueduration value observed
Exceptions
InvalidStatTypeif statistic is not time duration

Definition at line 54 of file stats_mgr.cc.

References isc::stats::StatsMgr::addValueInternal().

+ Here is the call graph for this function:

◆ addValue() [4/4]

void isc::stats::StatsMgr::addValue ( const std::string &  name,
const std::string &  value 
)

Records incremental string observation.

Parameters
namename of the observation
valuestring value observed
Exceptions
InvalidStatTypeif statistic is not a string

Definition at line 58 of file stats_mgr.cc.

References isc::stats::StatsMgr::addValueInternal().

+ Here is the call graph for this function:

◆ setMaxSampleAge()

void isc::stats::StatsMgr::setMaxSampleAge ( const std::string &  name,
const StatsDuration duration 
)

Determines maximum age of samples.

Specifies that statistic name should be stored not as a single value, but rather as a set of values. duration determines the timespan. Samples older than duration will be discarded. This is time-constrained approach. For sample count constrained approach, see setMaxSampleCount() below.

Todo:
: Not implemented.

Example: to set a statistic to keep observations for the last 5 minutes, call setMaxSampleAge("incoming-packets", time_duration(0,5,0,0)); to revert statistic to a single value, call: setMaxSampleAge("incoming-packets" time_duration(0,0,0,0))

Definition at line 80 of file stats_mgr.cc.

References isc_throw.

◆ setMaxSampleCount()

void isc::stats::StatsMgr::setMaxSampleCount ( const std::string &  name,
uint32_t  max_samples 
)

Determines how many samples of a given statistic should be kept.

Specifies that statistic name should be stored not as single value, but rather as a set of values. In this form, at most max_samples will be kept. When adding max_samples+1 sample, the oldest sample will be discarded.

Todo:
: Not implemented.

Example: To set a statistic to keep the last 100 observations, call: setMaxSampleCount("incoming-packets", 100);

Definition at line 85 of file stats_mgr.cc.

References isc_throw.

◆ setValue() [1/4]

void isc::stats::StatsMgr::setValue ( const std::string &  name,
const double  value 
)

Records absolute floating point observation.

Parameters
namename of the observation
valuefloating point value observed
Exceptions
InvalidStatTypeif statistic is not fp

Definition at line 35 of file stats_mgr.cc.

References isc::stats::StatsMgr::setValueInternal().

+ Here is the call graph for this function:

◆ setValue() [2/4]

void isc::stats::StatsMgr::setValue ( const std::string &  name,
const int64_t  value 
)

Records absolute integer observation.

Parameters
namename of the observation
valueinteger value observed
Exceptions
InvalidStatTypeif statistic is not integer

Definition at line 31 of file stats_mgr.cc.

References isc::stats::StatsMgr::setValueInternal().

Referenced by isc::stats::StatsMgr::addValueInternal(), isc::dhcp::CfgSubnets6::updateStatistics(), and isc::dhcp::CfgSubnets4::updateStatistics().

+ Here is the call graph for this function:

◆ setValue() [3/4]

void isc::stats::StatsMgr::setValue ( const std::string &  name,
const StatsDuration value 
)

Records absolute duration observation.

Parameters
namename of the observation
valueduration value observed
Exceptions
InvalidStatTypeif statistic is not time duration

Definition at line 39 of file stats_mgr.cc.

References isc::stats::StatsMgr::setValueInternal().

+ Here is the call graph for this function:

◆ setValue() [4/4]

void isc::stats::StatsMgr::setValue ( const std::string &  name,
const std::string &  value 
)

Records absolute string observation.

Parameters
namename of the observation
valuestring value observed
Exceptions
InvalidStatTypeif statistic is not a string

Definition at line 42 of file stats_mgr.cc.

References isc::stats::StatsMgr::setValueInternal().

+ Here is the call graph for this function: