Kea 2.7.6
Methods are used by data consumers.

Functions

size_t isc::stats::StatsMgr::count () const
 Returns number of available statistics.
 
bool isc::stats::StatsMgr::del (const std::string &name)
 Removes specified statistic.
 
isc::data::ConstElementPtr isc::stats::StatsMgr::get (const std::string &name) const
 Returns a single statistic as a JSON structure.
 
isc::data::ConstElementPtr isc::stats::StatsMgr::getAll () const
 Returns all statistics as a JSON structure.
 
size_t isc::stats::StatsMgr::getSize (const std::string &name) const
 Returns size of specified statistic.
 
void isc::stats::StatsMgr::removeAll ()
 Removes all collected statistics.
 
bool isc::stats::StatsMgr::reset (const std::string &name)
 Resets specified statistic.
 
void isc::stats::StatsMgr::resetAll ()
 Resets all collected statistics back to zero.
 

Detailed Description

The following methods are used by data consumers:

Function Documentation

◆ count()

size_t isc::stats::StatsMgr::count ( ) const

Returns number of available statistics.

Returns
number of recorded statistics.

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

◆ del()

bool isc::stats::StatsMgr::del ( const std::string & name)

Removes specified statistic.

Parameters
namename of the statistic to be removed.
Returns
true if successful, false if there's no such statistic

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

Referenced by isc::dhcp::CfgSubnets4::removeStatistics(), isc::dhcp::CfgSubnets6::removeStatistics(), and isc::stats::StatsMgr::statisticRemoveHandler().

◆ get()

ConstElementPtr isc::stats::StatsMgr::get ( const std::string & name) const

Returns a single statistic as a JSON structure.

Returns
JSON structures representing a single statistic

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

Referenced by isc::stats::StatsMgr::statisticGetHandler().

◆ getAll()

ConstElementPtr isc::stats::StatsMgr::getAll ( ) const

Returns all statistics as a JSON structure.

Returns
JSON structures representing all statistics

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

Referenced by isc::stats::StatsMgr::statisticGetAllHandler().

◆ getSize()

size_t isc::stats::StatsMgr::getSize ( const std::string & name) const

Returns size of specified statistic.

Parameters
namename of the statistic which size should be return.
Returns
size of specified statistic, 0 means lack of given statistic.

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

◆ removeAll()

void isc::stats::StatsMgr::removeAll ( )

Removes all collected statistics.

Note
This command was deprecated.

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

Referenced by isc::stats::StatsMgr::statisticRemoveAllHandler().

◆ reset()

bool isc::stats::StatsMgr::reset ( const std::string & name)

Resets specified statistic.

This is a convenience function and is equivalent to setValue(name, neutral_value), where neutral_value is 0, 0.0 or "".

Parameters
namename of the statistic to be reset.
Returns
true if successful, false if there's no such statistic

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

Referenced by isc::d2::D2TsigKey::resetStats(), and isc::stats::StatsMgr::statisticResetHandler().

◆ resetAll()

void isc::stats::StatsMgr::resetAll ( )

Resets all collected statistics back to zero.

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

Referenced by isc::stats::StatsMgr::statisticResetAllHandler().