Can be used to measure code execution performance. More...
#include <Stopwatch.hpp>
Public Member Functions | |
Stopwatch () | |
Creates a Stopwatch instance. | |
void | start () |
Starts the measurement. | |
std::chrono::microseconds | stop () |
Stops the measurement. | |
void | reset () |
Resets the stopwatch. | |
std::chrono::microseconds | getMaxValue () const |
Returns that maximum value that was measured by the stopwatch instance. | |
std::chrono::microseconds | getMinValue () const |
Returns that minimum value that was measured by the stopwatch instance. | |
std::chrono::microseconds | getAverageValue () const |
Returns that average value that was measured by the stopwatch instance. | |
uint | getNumberOfMeasurements () const |
Returns the number of measurements that was made by the stopwatch instance. | |
void | logReport () const |
Logs an info level message about the measured values. | |
Can be used to measure code execution performance.
Stopwatch class.
microseconds switchboard::Stopwatch::getAverageValue | ( | ) | const |
Returns that average value that was measured by the stopwatch instance.
microseconds switchboard::Stopwatch::getMaxValue | ( | ) | const |
Returns that maximum value that was measured by the stopwatch instance.
microseconds switchboard::Stopwatch::getMinValue | ( | ) | const |
Returns that minimum value that was measured by the stopwatch instance.
uint switchboard::Stopwatch::getNumberOfMeasurements | ( | ) | const |
Returns the number of measurements that was made by the stopwatch instance.
void switchboard::Stopwatch::reset | ( | ) |
Resets the stopwatch.
Clears all data about previous measurements.
microseconds switchboard::Stopwatch::stop | ( | ) |
Stops the measurement.