Kea  2.3.1-git
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 int64_t value)
 Records incremental integer observation. More...
 
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 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...
 
const StatsDurationisc::stats::StatsMgr::getMaxSampleAgeDefault () const
 Get default duration limit. More...
 
uint32_t isc::stats::StatsMgr::getMaxSampleCountDefault () const
 Get default count limit. More...
 
bool isc::stats::StatsMgr::setMaxSampleAge (const std::string &name, const StatsDuration &duration)
 Determines maximum age of samples. More...
 
void isc::stats::StatsMgr::setMaxSampleAgeAll (const StatsDuration &duration)
 Set duration limit for all collected statistics. More...
 
void isc::stats::StatsMgr::setMaxSampleAgeDefault (const StatsDuration &duration)
 Set default duration limit. More...
 
bool 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::setMaxSampleCountAll (uint32_t max_samples)
 Set count limit for all collected statistics. More...
 
void isc::stats::StatsMgr::setMaxSampleCountDefault (uint32_t max_samples)
 Set default count limit. 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 double value)
 Records absolute floating point 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]

◆ addValue() [2/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 87 of file lib/stats/stats_mgr.cc.

◆ 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 97 of file lib/stats/stats_mgr.cc.

◆ 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 107 of file lib/stats/stats_mgr.cc.

◆ getMaxSampleAgeDefault()

const StatsDuration & isc::stats::StatsMgr::getMaxSampleAgeDefault ( ) const

Get default duration limit.

Returns
default maximum age of samples to keep.

Definition at line 270 of file lib/stats/stats_mgr.cc.

Referenced by isc::dhcp::ControlledDhcpv6Srv::cleanup(), and isc::dhcp::ControlledDhcpv4Srv::loadConfigFile().

◆ getMaxSampleCountDefault()

uint32_t isc::stats::StatsMgr::getMaxSampleCountDefault ( ) const

Get default count limit.

Returns
default maximum number of samples to keep. (0 means that count limit was disabled)

Definition at line 285 of file lib/stats/stats_mgr.cc.

Referenced by isc::dhcp::ControlledDhcpv6Srv::cleanup(), and isc::dhcp::ControlledDhcpv4Srv::loadConfigFile().

◆ setMaxSampleAge()

bool 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. Example: To set a statistic to keep observations for the last 5 minutes, call: setMaxSampleAge("incoming-packets", StatsDuration::minutes(5)); to revert statistic to a single value, call: setMaxSampleAge("incoming-packets", StatsDuration:zero());

Parameters
namename of the observation
durationdetermines maximum age of samples
Returns
true if successful, false if there's no such statistic

Definition at line 168 of file lib/stats/stats_mgr.cc.

◆ setMaxSampleAgeAll()

void isc::stats::StatsMgr::setMaxSampleAgeAll ( const StatsDuration duration)

Set duration limit for all collected statistics.

Parameters
durationdetermines maximum age of samples

Definition at line 210 of file lib/stats/stats_mgr.cc.

Referenced by isc::dhcp::SrvConfig::updateStatistics().

◆ setMaxSampleAgeDefault()

void isc::stats::StatsMgr::setMaxSampleAgeDefault ( const StatsDuration duration)

Set default duration limit.

Parameters
durationdefault maximum age of samples to keep

Definition at line 240 of file lib/stats/stats_mgr.cc.

Referenced by isc::dhcp::SrvConfig::updateStatistics().

◆ setMaxSampleCount()

bool 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. Example: To set a statistic to keep the last 100 observations, call: setMaxSampleCount("incoming-packets", 100);

Parameters
namename of the observation
max_sampleshow many samples of a given statistic should be kept
Returns
true if successful, false if there's no such statistic

Definition at line 189 of file lib/stats/stats_mgr.cc.

◆ setMaxSampleCountAll()

void isc::stats::StatsMgr::setMaxSampleCountAll ( uint32_t  max_samples)

Set count limit for all collected statistics.

Parameters
max_sampleshow many samples of a given statistic should be kept

Definition at line 225 of file lib/stats/stats_mgr.cc.

Referenced by isc::dhcp::SrvConfig::updateStatistics().

◆ setMaxSampleCountDefault()

void isc::stats::StatsMgr::setMaxSampleCountDefault ( uint32_t  max_samples)

Set default count limit.

Parameters
max_samplesdefault maximum number of samples to keep (0 means to disable count limit and enable age limit)

Definition at line 255 of file lib/stats/stats_mgr.cc.

Referenced by isc::d2::D2Stats::init(), and isc::dhcp::SrvConfig::updateStatistics().

◆ setValue() [1/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 37 of file lib/stats/stats_mgr.cc.

Referenced by isc::d2::D2Stats::init(), isc::dhcp::Dhcpv6Srv::setPacketStatisticsDefaults(), isc::dhcp::Dhcpv4Srv::setPacketStatisticsDefaults(), isc::dhcp::CfgSubnets6::updateStatistics(), isc::dhcp::CfgSubnets4::updateStatistics(), and isc::d2::D2TsigKey::~D2TsigKey().

◆ setValue() [2/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 47 of file lib/stats/stats_mgr.cc.

◆ 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 57 of file lib/stats/stats_mgr.cc.

◆ 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 67 of file lib/stats/stats_mgr.cc.