Kea  1.5.0
Methods are used by data consumers.

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

Functions

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

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 139 of file 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 99 of file stats_mgr.cc.

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

◆ get()

isc::data::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 107 of file stats_mgr.cc.

References isc::data::Element::createMap(), and isc::stats::StatsMgr::getObservation().

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

+ Here is the call graph for this function:

◆ getAll()

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

Returns all statistics as a JSON structure.

Returns
JSON structures representing all statistics

Definition at line 116 of file stats_mgr.cc.

References isc::data::Element::createMap().

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

+ Here is the call graph for this function:

◆ removeAll()

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

Removes all collected statistics.

Definition at line 103 of file 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 89 of file stats_mgr.cc.

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

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

+ Here is the call graph for this function:

◆ resetAll()

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

Resets all collected statistics back to zero.

Definition at line 129 of file stats_mgr.cc.

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