#include <sleipnir/util/solve_profiler.hpp>
|
std::string | name |
| Name of measurement to show in diagnostics.
|
|
Records the number of profiler measurements (start/stop pairs) and the average duration between each start and stop call.
◆ SolveProfiler() [1/2]
slp::SolveProfiler::SolveProfiler |
( |
| ) |
|
|
default |
◆ SolveProfiler() [2/2]
slp::SolveProfiler::SolveProfiler |
( |
std::string_view |
name | ) |
|
|
inlineexplicit |
Constructs a SolveProfiler.
- Parameters
-
name | Name of measurement to show in diagnostics. |
◆ average_duration()
const std::chrono::duration< double > & slp::SolveProfiler::average_duration |
( |
| ) |
const |
|
inline |
Returns the average solve duration in milliseconds as a double.
- Returns
- The average solve duration in milliseconds as a double.
◆ current_duration()
const std::chrono::duration< double > & slp::SolveProfiler::current_duration |
( |
| ) |
const |
|
inline |
Returns the most recent solve duration in milliseconds as a double.
- Returns
- The most recent solve duration in milliseconds as a double.
◆ num_solves()
int slp::SolveProfiler::num_solves |
( |
| ) |
const |
|
inline |
Returns the number of solves.
- Returns
- The number of solves.
◆ start()
void slp::SolveProfiler::start |
( |
| ) |
|
|
inline |
Tell the profiler to start measuring solve time.
◆ stop()
void slp::SolveProfiler::stop |
( |
| ) |
|
|
inline |
Tell the profiler to stop measuring solve time, increment the number of averages, and incorporate the latest measurement into the average.
◆ total_duration()
const std::chrono::duration< double > & slp::SolveProfiler::total_duration |
( |
| ) |
const |
|
inline |
Returns the sum of all solve durations in milliseconds as a double.
- Returns
- The sum of all solve durations in milliseconds as a double.
The documentation for this class was generated from the following file: