Kea  2.3.1-git
isc::stats Namespace Reference

Classes

class  DuplicateStat
 Exception indicating that a given statistic is duplicated. More...
 
class  InvalidStatType
 Exception thrown if invalid statistic type is used. More...
 
class  Observation
 Represents a single observable characteristic (a 'statistic') More...
 
struct  StatContext
 Statistics context. More...
 
class  StatsMgr
 Statistics Manager class. More...
 

Typedefs

typedef std::pair< StatsDuration, SampleClock::time_point > DurationSample
 Time Duration. More...
 
typedef std::pair< double, SampleClock::time_point > FloatSample
 Float (implemented as double precision) More...
 
typedef std::pair< int64_t, SampleClock::time_point > IntegerSample
 Integer (implemented as signed 64-bit integer) More...
 
typedef boost::shared_ptr< ObservationObservationPtr
 Observation pointer. More...
 
typedef std::chrono::system_clock SampleClock
 Define clock type. More...
 
typedef boost::shared_ptr< StatContextStatContextPtr
 Pointer to the statistics context. More...
 
typedef std::chrono::system_clock::duration StatsDuration
 Defines duration type. More...
 
typedef std::pair< std::string, SampleClock::time_point > StringSample
 String. More...
 

Functions

long toSeconds (const StatsDuration &dur)
 Returns the number of seconds in a duration. More...
 

Typedef Documentation

◆ ObservationPtr

typedef boost::shared_ptr<Observation> isc::stats::ObservationPtr

Observation pointer.

Definition at line 440 of file observation.h.

◆ SampleClock

typedef std::chrono::system_clock isc::stats::SampleClock

Define clock type.

Note
: we use the system clock i.e. the wall clock because this clock can be converted from and to standard Unix time (time_t).

Definition at line 34 of file observation.h.

◆ StatContextPtr

typedef boost::shared_ptr<StatContext> isc::stats::StatContextPtr

Pointer to the statistics context.

Definition at line 85 of file context.h.

◆ StatsDuration

typedef std::chrono::system_clock::duration isc::stats::StatsDuration

Defines duration type.

Note
: the precision depends on the system,

Definition at line 39 of file observation.h.

Function Documentation

◆ toSeconds()

long isc::stats::toSeconds ( const StatsDuration dur)
inline

Returns the number of seconds in a duration.

Parameters
durThe duration.
Returns
The number of seconds in the given duration.

Definition at line 45 of file observation.h.

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