Kea  1.9.9-git
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...
 
size_t isc::stats::StatsMgr::getSize (const std::string &name) const
 Returns size of specified statistic. 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

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

Returns number of available statistics.

Returns
number of recorded statistics.

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

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

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

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

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

Returns all statistics as a JSON structure.

Returns
JSON structures representing all statistics

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

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

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

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

Removes all collected statistics.

Note
This command was deprecated.

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

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

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

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

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

Resets all collected statistics back to zero.

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

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