![]() |
Kea 2.6.2
|
#include <monitored_duration.h>
Inheritance diagram for isc::perfmon::MonitoredDuration:Public Member Functions | |
| MonitoredDuration (const DurationKey &key, const Duration &interval_duration) | |
| Constructor. | |
| MonitoredDuration (const MonitoredDuration &rhs) | |
| Copy Constructor. | |
| MonitoredDuration (uint16_t family, uint8_t query_type, uint8_t response_type, const std::string &start_event_label, const std::string &stop_event_label, dhcp::SubnetID subnet_id, const Duration &interval_duration) | |
| Constructor. | |
| virtual | ~MonitoredDuration ()=default |
| Destructor. | |
| bool | addSample (const Duration &sample) |
| Add a sample to the duration's current interval. | |
| void | clear () |
| Deletes the current and previous intervals. | |
| void | expireCurrentInterval () |
| Concludes the current interval. | |
| DurationDataIntervalPtr | getCurrentInterval () const |
| Get the current interval. | |
| Timestamp | getCurrentIntervalStart () const |
| Get the current interval start time. | |
| Duration | getIntervalDuration () const |
| Get the interval duration. | |
| DurationDataIntervalPtr | getPreviousInterval () const |
| Get the previous interval. | |
Public Member Functions inherited from isc::perfmon::DurationKey | |
| DurationKey (uint16_t family, uint8_t query_type, uint8_t response_type, const std::string &start_event_label, const std::string &stop_event_label, dhcp::SubnetID subnet_id) | |
| Constructor. | |
| virtual | ~DurationKey ()=default |
| Destructor. | |
| uint16_t | getFamily () |
| Get protocol family. | |
| std::string | getLabel () const |
| Get a composite label of the member values with text message types. | |
| uint8_t | getQueryType () const |
| Get the query packet type. | |
| uint8_t | getResponseType () const |
| Get the response packet type. | |
| std::string | getStartEventLabel () const |
| Get the start event label. | |
| std::string | getStatName (const std::string &value_name) const |
| Get the StatsMgr formatted compatible name. | |
| std::string | getStopEventLabel () const |
| Get the end event label. | |
| dhcp::SubnetID | getSubnetId () const |
| Get the subnet id. | |
| bool | operator!= (const DurationKey &other) const |
| Inequality operator. | |
| bool | operator< (const DurationKey &other) const |
| Less than operator. | |
| bool | operator== (const DurationKey &other) const |
| Equality operator. | |
| void | setSubnetId (dhcp::SubnetID subnet_id) |
| Set the subnet id. | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::perfmon::DurationKey | |
| static std::string | getMessageTypeLabel (uint16_t family, uint16_t msg_type) |
| Get a label for a family-specific message type (e.g. | |
| static void | validateMessagePair (uint16_t family, uint8_t query_type, uint8_t response_type) |
| Validates that a query and response message type pair is sane. | |
Protected Attributes inherited from isc::perfmon::DurationKey | |
| uint16_t | family_ |
| Protocol family AF_INET or AF_INET6. | |
| uint8_t | query_type_ |
| Query message type (e.g. DHCPDISCOVER, DHCP6_SOLICIT). | |
| uint8_t | response_type_ |
| Response message type (e.g. DHCPOFFER, DHCP6_ADVERTISE). | |
| std::string | start_event_label_ |
| Label of the start event which begins the duration. | |
| std::string | stop_event_label_ |
| Label of the end event which ends the duration. | |
| isc::dhcp::SubnetID | subnet_id_ |
| Subnet ID of the subnet selected during query fulfillment. | |
Definition at line 304 of file monitored_duration.h.
| isc::perfmon::MonitoredDuration::MonitoredDuration | ( | uint16_t | family, |
| uint8_t | query_type, | ||
| uint8_t | response_type, | ||
| const std::string & | start_event_label, | ||
| const std::string & | stop_event_label, | ||
| dhcp::SubnetID | subnet_id, | ||
| const Duration & | interval_duration ) |
Constructor.
| family | protocol family AF_INET or AF_INET6 |
| query_type | message type of the query packet |
| response_type | message type of the response packet |
| start_event_label | label of the start event |
| stop_event_label | label of the end event |
| subnet_id | id of the selected subnet |
| interval_duration | the interval duration |
Definition at line 230 of file monitored_duration.cc.
References isc::perfmon::DurationKey::DurationKey(), isc_throw, and isc::perfmon::DurationDataInterval::ZERO_DURATION().
Referenced by MonitoredDuration().
Here is the call graph for this function:| isc::perfmon::MonitoredDuration::MonitoredDuration | ( | const DurationKey & | key, |
| const Duration & | interval_duration ) |
Constructor.
| key | composite key that identifies the alarm |
| interval_duration | the interval duration |
Definition at line 247 of file monitored_duration.cc.
References isc::perfmon::DurationKey::DurationKey(), isc_throw, and isc::perfmon::DurationDataInterval::ZERO_DURATION().
Here is the call graph for this function:| isc::perfmon::MonitoredDuration::MonitoredDuration | ( | const MonitoredDuration & | rhs | ) |
Copy Constructor.
| rhs | duration to copy |
Definition at line 259 of file monitored_duration.cc.
References isc::perfmon::DurationKey::DurationKey(), MonitoredDuration(), and if().
Here is the call graph for this function:
|
virtualdefault |
Destructor.
| bool isc::perfmon::MonitoredDuration::addSample | ( | const Duration & | sample | ) |
Add a sample to the duration's current interval.
If there is no current interval start a new one otherwise if the current interval has expired move it to the previous interval, set the return flag to true, then start a new interval. Add the sample to the current interval.
| sample | duration value to add |
Definition at line 280 of file monitored_duration.cc.
References isc::dhcp::PktEvent::now().
Here is the call graph for this function:| void isc::perfmon::MonitoredDuration::clear | ( | ) |
Deletes the current and previous intervals.
Definition at line 307 of file monitored_duration.cc.
| void isc::perfmon::MonitoredDuration::expireCurrentInterval | ( | ) |
Concludes the current interval.
Rotates current interval to previous and resets curent interval to empty.
| InvalidOperation | if there is no current interval. |
Definition at line 296 of file monitored_duration.cc.
References isc::perfmon::DurationKey::getLabel(), and isc_throw.
Here is the call graph for this function:
|
inline |
Get the current interval.
Definition at line 350 of file monitored_duration.h.
| Timestamp isc::perfmon::MonitoredDuration::getCurrentIntervalStart | ( | ) | const |
Get the current interval start time.
Definition at line 274 of file monitored_duration.cc.
References isc::dhcp::PktEvent::MIN_TIME().
Here is the call graph for this function:
|
inline |
Get the interval duration.
Definition at line 336 of file monitored_duration.h.
|
inline |
Get the previous interval.
Definition at line 343 of file monitored_duration.h.