![]() |
Kea 2.7.3
|
Embodies a span of time (i.e. More...
#include <monitored_duration.h>
Public Member Functions | |
DurationDataInterval (const Timestamp &start_time=dhcp::PktEvent::now()) | |
Constructor. | |
~DurationDataInterval ()=default | |
Destructor. | |
void | addDuration (const Duration &duration) |
Add a duration to the interval. | |
Duration | getMaxDuration () const |
Get the maximum duration that has occurred in the interval. | |
Duration | getMeanDuration () const |
Get the mean duration for the interval. | |
Duration | getMinDuration () const |
Get the minimum duration that has occurred in the interval. | |
uint64_t | getOccurrences () const |
Get the number of occurrences that have contributed to the interval. | |
const Timestamp & | getStartTime () const |
Get the start time of the interval. | |
Duration | getTotalDuration () const |
Get the total duration in the interval. | |
bool | operator== (const DurationDataInterval &other) const |
Equality operator. | |
void | setStartTime (const Timestamp &start_time) |
Set the interval start time. | |
Static Public Member Functions | |
static const Duration & | ZERO_DURATION () |
Get a duration of zero. | |
Embodies a span of time (i.e.
an interval) over which duration data is accumulated.
Definition at line 25 of file monitored_duration.h.
|
explicit |
Constructor.
Definition at line 26 of file monitored_duration.cc.
|
default |
Destructor.
void isc::perfmon::DurationDataInterval::addDuration | ( | const Duration & | duration | ) |
Add a duration to the interval.
Given a duration value:
duration | Duration to add. |
Definition at line 33 of file monitored_duration.cc.
|
inline |
Get the maximum duration that has occurred in the interval.
Definition at line 83 of file monitored_duration.h.
Duration isc::perfmon::DurationDataInterval::getMeanDuration | ( | ) | const |
Get the mean duration for the interval.
Definition at line 47 of file monitored_duration.cc.
References ZERO_DURATION().
|
inline |
Get the minimum duration that has occurred in the interval.
Definition at line 76 of file monitored_duration.h.
|
inline |
Get the number of occurrences that have contributed to the interval.
Definition at line 69 of file monitored_duration.h.
|
inline |
Get the start time of the interval.
Definition at line 54 of file monitored_duration.h.
|
inline |
Get the total duration in the interval.
Definition at line 90 of file monitored_duration.h.
bool isc::perfmon::DurationDataInterval::operator== | ( | const DurationDataInterval & | other | ) | const |
Equality operator.
Primarily used for testing.
equality operator to compare two DurationDataInterval objects.
other | DurationDataInterval to be compared against. |
Definition at line 56 of file monitored_duration.cc.
|
inline |
Set the interval start time.
start_time | new value for the interval start time. |
Definition at line 61 of file monitored_duration.h.
|
inlinestatic |
Get a duration of zero.
Definition at line 30 of file monitored_duration.h.
Referenced by isc::perfmon::MonitoredDuration::MonitoredDuration(), isc::perfmon::MonitoredDuration::MonitoredDuration(), isc::perfmon::MonitoredDurationStore::MonitoredDurationStore(), and getMeanDuration().