Kea: Methods are used by data producers.

| Kea 3.2.0-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 double value)
| Records incremental floating point observation.
void | isc::stats::StatsMgr::addValue (const std::string &name, const int64_t value)
| Records incremental integer observation.
void | isc::stats::StatsMgr::addValue (const std::string &name, const isc::util::int128_t &value)
| Records an incremental big integer observation.
void | isc::stats::StatsMgr::addValue (const std::string &name, const StatsDuration &value)
| Records incremental duration observation.
void | isc::stats::StatsMgr::addValue (const std::string &name, const std::string &value)
| Records incremental string observation.
const StatsDuration & | isc::stats::StatsMgr::getMaxSampleAgeDefault () const
| Get default duration limit.
uint32_t | isc::stats::StatsMgr::getMaxSampleCountDefault () const
| Get default count limit.
bool | isc::stats::StatsMgr::setMaxSampleAge (const std::string &name, const StatsDuration &duration)
| Determines maximum age of samples.
void | isc::stats::StatsMgr::setMaxSampleAgeAll (const StatsDuration &duration)
| Set duration limit for all collected statistics.
void | isc::stats::StatsMgr::setMaxSampleAgeDefault (const StatsDuration &duration)
| Set default duration limit.
bool | isc::stats::StatsMgr::setMaxSampleCount (const std::string &name, uint32_t max_samples)
| Determines how many samples of a given statistic should be kept.
void | isc::stats::StatsMgr::setMaxSampleCountAll (uint32_t max_samples)
| Set count limit for all collected statistics.
void | isc::stats::StatsMgr::setMaxSampleCountDefault (uint32_t max_samples)
| Set default count limit.
void | isc::stats::StatsMgr::setValue (const std::string &name, const double value)
| Records absolute floating point observation.
void | isc::stats::StatsMgr::setValue (const std::string &name, const int64_t value)
| Records absolute integer observation.
void | isc::stats::StatsMgr::setValue (const std::string &name, const isc::util::int128_t &value)
| Records an absolute big integer observation.
void | isc::stats::StatsMgr::setValue (const std::string &name, const StatsDuration &value)
| Records absolute duration observation.
void | isc::stats::StatsMgr::setValue (const std::string &name, const std::string &value)
| Records absolute string observation.

## Detailed Description

The following methods are used by data producers:

## Function Documentation

## ◆ addValue() [1/5]

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

Records incremental floating point observation.

Parameters

  name | name of the observation
  value | floating point value observed

Exceptions

  InvalidStatType | if statistic is not fp

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

References addValueInternal().

Here is the call graph for this function:

## ◆ addValue() [2/5]

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

Records incremental integer observation.

Parameters

  name | name of the observation
  value | integer value observed

Exceptions

  InvalidStatType | if statistic is not integer

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

References addValueInternal().

Referenced by isc::dhcp::Dhcpv4Exchange::Dhcpv4Exchange(), isc::dhcp::Dhcpv4Srv::acceptDirectRequest(), isc::dhcp::Dhcpv4Srv::acceptMessageType(), isc::dhcp::Dhcpv4Srv::acceptServerId(), isc::lease_query::LeaseQueryImpl4::acceptServerId(), isc::dhcp::Dhcpv6Srv::assignIA_NA(), isc::dhcp::Dhcpv6Srv::assignIA_PD(), isc::dhcp::Dhcpv4Srv::assignLease(), buffer4_receive(), isc::ha::HAImpl::buffer4Receive(), buffer6_receive(), isc::ha::HAImpl::buffer6Receive(), isc::dhcp::LeaseMgr::bumpStat(), isc::dhcp::LeaseMgr::bumpStatPrefix(), isc::gss_tsig::GssTsigImpl::createKey(), isc::dhcp::Dhcpv4Srv::declineLease(), isc::dhcp::Dhcpv6Srv::declineLease(), isc::dhcp::deleteAssignedLease(), isc::dhcp::Dhcpv4Srv::earlyGHRLookup(), isc::dhcp::Dhcpv6Srv::earlyGHRLookup(), isc::dhcp::Dhcpv6Srv::extendIA_NA(), isc::dhcp::Dhcpv6Srv::extendIA_PD(), isc::dhcp::Dhcpv6Srv::initContext(), isc::lease_cmds::LeaseCmdsImpl::lease4WipeHandler(), isc::lease_cmds::LeaseCmdsImpl::lease6WipeHandler(), isc::ha::HAImpl::leases4Committed(), isc::ha::HAImpl::leases6Committed(), isc::d2::D2QueueMgr::operator()(), isc::limits::LimitManager::pkt_receive(), isc::dhcp::Dhcpv6Srv::processAddrRegInform(), isc::dhcp::Dhcpv4Srv::processDecline(), isc::dhcp::Dhcpv4Srv::processDhcp4Query(), isc::dhcp::Dhcpv4Srv::processDhcp4QueryAndSendResponse(), isc::dhcp::Dhcpv6Srv::processDhcp6QueryAndSendResponse(), isc::dhcp::Dhcpv4Srv::processLocalizedQuery4(), isc::dhcp::Dhcpv4Srv::processLocalizedQuery4AndSendResponse(), isc::dhcp::Dhcpv6Srv::processLocalizedQuery6(), isc::dhcp::Dhcpv6Srv::processLocalizedQuery6AndSendResponse(), isc::dhcp::Dhcpv4Srv::processPacket(), isc::dhcp::Dhcpv6Srv::processPacket(), isc::dhcp::Dhcpv4Srv::processPacketAndSendResponseNoThrow(), isc::dhcp::Dhcpv6Srv::processPacketAndSendResponseNoThrow(), isc::lease_query::LeaseQueryImpl4::processQuery(), isc::lease_query::LeaseQueryImpl6::processQuery(), isc::dhcp::Dhcpv4Srv::processRelease(), isc::dhcp::Dhcpv4Srv::processStatsReceived(), isc::dhcp::Dhcpv4Srv::processStatsSent(), isc::dhcp::Dhcpv6Srv::processStatsSent(), isc::dhcp_ddns::NameChangeUDPListener::receiveCompletionHandler(), isc::dhcp::LeaseMgr::recountLeaseStats4(), isc::dhcp::LeaseMgr::recountLeaseStats6(), isc::dhcp::Dhcpv6Srv::releaseIA_NA(), isc::dhcp::Dhcpv6Srv::releaseIA_PD(), isc::dhcp::Dhcpv4Srv::runOne(), isc::dhcp::Dhcpv6Srv::runOne(), isc::dhcp::Dhcpv4Srv::sanityCheck(), isc::dhcp::Dhcpv6Srv::sanityCheck(), isc::dhcp::Dhcpv4Srv::selectSubnet(), isc::dhcp::Dhcpv6Srv::selectSubnet(), isc::dhcp::Dhcpv4Srv::selectSubnet4o6(), isc::lease_query::LeaseQueryImpl4::sendResponse(), isc::lease_query::LeaseQueryImpl6::sendResponse(), isc::dhcp::Dhcpv4Srv::serverDecline(), isc::ping_check::PingCheckMgr::shouldPing(), subnet4_select(), isc::ha::HAImpl::subnet4Select(), subnet6_select(), isc::ha::HAImpl::subnet6Select(), isc::limits::LimitManager::subnet_select(), isc::radius::RadiusAccess::terminate4(), isc::radius::RadiusAccess::terminate6(), isc::dhcp::Dhcpv6Srv::testServerID(), isc::lease_query::LeaseQueryImpl6::testServerId(), isc::dhcp::Dhcpv6Srv::testUnicast(), isc::dhcp::ClientHandler::tryLock(), isc::dhcp::CfgSubnets4::updateStatistics(), isc::dhcp::CfgSubnets6::updateStatistics(), isc::dhcp::LeaseMgr::updateStatsOnAdd(), isc::dhcp::LeaseMgr::updateStatsOnAdd(), isc::dhcp::LeaseMgr::updateStatsOnDelete(), and isc::dhcp::LeaseMgr::updateStatsOnDelete().

Here is the call graph for this function:

## ◆ addValue() [3/5]

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

Records an incremental big integer observation.

Parameters

  name | name of the observation
  value | integer value observed

Exceptions

  InvalidStatType | if statistic is not integer

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

References addValueInternal().

Here is the call graph for this function:

## ◆ addValue() [4/5]

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

Records incremental duration observation.

Parameters

  name | name of the observation
  value | duration value observed

Exceptions

  InvalidStatType | if statistic is not time duration

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

References addValueInternal().

Here is the call graph for this function:

## ◆ addValue() [5/5]

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

Records incremental string observation.

Parameters

  name | name of the observation
  value | string value observed

Exceptions

  InvalidStatType | if statistic is not a string

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

References addValueInternal().

Here is the call graph for this function:

## ◆ getMaxSampleAgeDefault()

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

Get default duration limit.

Returns
  default maximum age of samples to keep.

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

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

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

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

## ◆ 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

  name | name of the observation
  duration | determines maximum age of samples

Returns
  true if successful, false if there's no such statistic

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

Referenced by statisticSetMaxSampleAgeHandler().

## ◆ setMaxSampleAgeAll()

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

Set duration limit for all collected statistics.

Parameters

  duration | determines maximum age of samples

Definition at line 173 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

  duration | default maximum age of samples to keep

Definition at line 195 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

  name | name of the observation
  max_samples | how many samples of a given statistic should be kept

Returns
  true if successful, false if there's no such statistic

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

Referenced by statisticSetMaxSampleCountHandler().

## ◆ setMaxSampleCountAll()

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

Set count limit for all collected statistics.

Parameters

  max_samples | how many samples of a given statistic should be kept

Definition at line 184 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_samples | default maximum number of samples to keep (0 means to disable count limit and enable age limit)

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

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

## ◆ setValue() [1/5]

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

Records absolute floating point observation.

Parameters

  name | name of the observation
  value | floating point value observed

Exceptions

  InvalidStatType | if statistic is not fp

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

References setValueInternal().

Here is the call graph for this function:

## ◆ setValue() [2/5]

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

Records absolute integer observation.

Parameters

  name | name of the observation
  value | integer value observed

Exceptions

  InvalidStatType | if statistic is not integer

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

References setValueInternal().

Referenced by isc::gss_tsig::GssTsigImpl::configure(), isc::d2::D2Stats::init(), isc::lease_cmds::LeaseCmdsImpl::lease4WipeHandler(), isc::lease_cmds::LeaseCmdsImpl::lease6WipeHandler(), isc::dhcp::LeaseMgr::recountLeaseStats4(), isc::dhcp::LeaseMgr::recountLeaseStats6(), isc::perfmon::PerfMonMgr::reportToStatsMgr(), isc::dhcp::Dhcpv4Srv::setPacketStatisticsDefaults(), isc::dhcp::Dhcpv6Srv::setPacketStatisticsDefaults(), isc::dhcp::CfgSubnets4::updateStatistics(), and isc::dhcp::CfgSubnets6::updateStatistics().

Here is the call graph for this function:

## ◆ setValue() [3/5]

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

Records an absolute big integer observation.

Parameters

  name | name of the observation
  value | integer value observed

Exceptions

  InvalidStatType | if statistic is not integer

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

References setValueInternal().

Here is the call graph for this function:

## ◆ setValue() [4/5]

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

Records absolute duration observation.

Parameters

  name | name of the observation
  value | duration value observed

Exceptions

  InvalidStatType | if statistic is not time duration

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

References setValueInternal().

Here is the call graph for this function:

## ◆ setValue() [5/5]

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

Records absolute string observation.

Parameters

  name | name of the observation
  value | string value observed

Exceptions

  InvalidStatType | if statistic is not a string

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

References setValueInternal().

Here is the call graph for this function: