A helper class for tracking and logging short time intervals across a period of time.
More...
#include <src/logging.h>
|
| void | first_point (const std::chrono::steady_clock::time_point &point) |
| | Store the first timestamp for a measured interval.
|
| |
|
void | first_point_now () |
| | Store the current time as the first timestamp.
|
| |
| bool | is_enabled () const |
| | Check whether this periodic logger should emit at the configured severity.
|
| |
|
void | reset () |
| | Reset the object to its initial empty state.
|
| |
| void | second_point_and_log (const std::chrono::steady_clock::time_point &point) |
| | Store the second timestamp and log the elapsed interval.
|
| |
|
void | second_point_now_and_log () |
| | Store the current time as the second timestamp and log the elapsed interval.
|
| |
| | time_delta_periodic_logger (boost::log::sources::severity_logger< int > &severity, std::string_view message, std::chrono::seconds interval_in_seconds=std::chrono::seconds(20)) |
| | Construct a periodic logger for elapsed-time samples.
|
| |
A helper class for tracking and logging short time intervals across a period of time.
*Examples**
logger.first_point_now();
logger.second_point_now_and_log();
logger.first_point_now();
logger.second_point_now_and_log();
A helper class for tracking and logging short time intervals across a period of time.
Definition logging.h:204
bl::sources::severity_logger< int > debug
Follow what is happening.
Definition logging.cpp:41
◆ time_delta_periodic_logger()
| logging::time_delta_periodic_logger::time_delta_periodic_logger |
( |
boost::log::sources::severity_logger< int > & | severity, |
|
|
std::string_view | message, |
|
|
std::chrono::seconds | interval_in_seconds = std::chrono::seconds(20) ) |
|
inline |
Construct a periodic logger for elapsed-time samples.
- Parameters
-
| severity | Severity level associated with the log message. |
| message | Message text to log or report. |
| interval_in_seconds | Interval in seconds. |
◆ first_point()
| void logging::time_delta_periodic_logger::first_point |
( |
const std::chrono::steady_clock::time_point & | point | ) |
|
|
inline |
Store the first timestamp for a measured interval.
- Parameters
-
| point | Time point used for elapsed-time calculations. |
◆ is_enabled()
| bool logging::time_delta_periodic_logger::is_enabled |
( |
| ) |
const |
|
inline |
Check whether this periodic logger should emit at the configured severity.
- Returns
- True when the logger severity is enabled and sampling should continue.
◆ second_point_and_log()
| void logging::time_delta_periodic_logger::second_point_and_log |
( |
const std::chrono::steady_clock::time_point & | point | ) |
|
|
inline |
Store the second timestamp and log the elapsed interval.
- Parameters
-
| point | Time point used for elapsed-time calculations. |
The documentation for this class was generated from the following file: