#include </home/runner/work/Sleipnir/Sleipnir/include/sleipnir/util/time_tracer.hpp>
Records the number of tracer measurements (start/stop pairs) and the average duration between each start and stop call.
◆ SolveTimeTracer()
| slp::SolveTimeTracer::SolveTimeTracer |
( |
bool |
enabled | ) |
|
|
inlineexplicit |
Constructs a tracer.
- Parameters
-
| enabled | Whether to measure time. |
◆ average_duration()
| const std::chrono::duration< double > & slp::SolveTimeTracer::average_duration |
( |
| ) |
const |
|
inline |
Returns the average solve duration in seconds.
- Returns
- The average solve duration in seconds.
◆ current_duration()
| const std::chrono::duration< double > & slp::SolveTimeTracer::current_duration |
( |
| ) |
const |
|
inline |
Returns the most recent solve duration in seconds.
- Returns
- The most recent solve duration in seconds.
◆ num_solves()
| int slp::SolveTimeTracer::num_solves |
( |
| ) |
const |
|
inline |
Returns the number of solves.
- Returns
- The number of solves.
◆ stop()
| void slp::SolveTimeTracer::stop |
( |
| ) |
|
|
inline |
Stops solve time measurement, increments the number of averages, and incorporates the latest measurement into the average.
◆ total_duration()
| const std::chrono::duration< double > & slp::SolveTimeTracer::total_duration |
( |
| ) |
const |
|
inline |
Returns the sum of all solve durations in seconds.
- Returns
- The sum of all solve durations in seconds.
The documentation for this class was generated from the following file: