Kea  1.5.0
isc::perfdhcp::StatsMgr< T >::CustomCounter Class Reference

Custom Counter. More...

#include <stats_mgr.h>

Public Member Functions

 CustomCounter (const std::string &name)
 Constructor. More...
 
const std::string & getName () const
 Return counter name. More...
 
uint64_t getValue () const
 Return counter value. More...
 
const CustomCounteroperator++ ()
 Increment operator. More...
 
const CustomCounteroperator++ (int)
 Increment operator. More...
 
const CustomCounteroperator+= (int val)
 

Detailed Description

template<class T = dhcp::Pkt4>
class isc::perfdhcp::StatsMgr< T >::CustomCounter

Custom Counter.

This class represents custom statistics counters. Client class may create unlimited number of counters. Such counters are being stored in map in Statistics Manager and access using unique string key.

Definition at line 57 of file bin/perfdhcp/stats_mgr.h.

Constructor & Destructor Documentation

◆ CustomCounter()

template<class T = dhcp::Pkt4>
isc::perfdhcp::StatsMgr< T >::CustomCounter::CustomCounter ( const std::string &  name)
inline

Constructor.

This constructor sets counter name. This name is used in log file to report value of each counter.

Parameters
namename of the counter used in log file.

Definition at line 65 of file bin/perfdhcp/stats_mgr.h.

Member Function Documentation

◆ getName()

template<class T = dhcp::Pkt4>
const std::string& isc::perfdhcp::StatsMgr< T >::CustomCounter::getName ( ) const
inline

Return counter name.

Method returns counter name.

Returns
counter name.

Definition at line 99 of file bin/perfdhcp/stats_mgr.h.

◆ getValue()

template<class T = dhcp::Pkt4>
uint64_t isc::perfdhcp::StatsMgr< T >::CustomCounter::getValue ( ) const
inline

Return counter value.

Method returns counter value.

Returns
counter value.

Definition at line 92 of file bin/perfdhcp/stats_mgr.h.

◆ operator++() [1/2]

template<class T = dhcp::Pkt4>
const CustomCounter& isc::perfdhcp::StatsMgr< T >::CustomCounter::operator++ ( )
inline

Increment operator.

Definition at line 70 of file bin/perfdhcp/stats_mgr.h.

Referenced by isc::perfdhcp::StatsMgr< T >::CustomCounter::operator++().

◆ operator++() [2/2]

template<class T = dhcp::Pkt4>
const CustomCounter& isc::perfdhcp::StatsMgr< T >::CustomCounter::operator++ ( int  )
inline

Increment operator.

Definition at line 76 of file bin/perfdhcp/stats_mgr.h.

References isc::perfdhcp::StatsMgr< T >::CustomCounter::operator++().

+ Here is the call graph for this function:

◆ operator+=()

template<class T = dhcp::Pkt4>
const CustomCounter& isc::perfdhcp::StatsMgr< T >::CustomCounter::operator+= ( int  val)
inline

Definition at line 82 of file bin/perfdhcp/stats_mgr.h.


The documentation for this class was generated from the following file: