![]() |
Sleipnir C++ API
|
#include </home/runner/work/Sleipnir/Sleipnir/include/sleipnir/util/profiler.hpp>
Public Member Functions | |
| SolveProfiler (std::string_view name) | |
| void | start () |
| Starts solve time measurement. | |
| void | stop () |
| std::string_view | name () const |
| int | num_solves () const |
| const std::chrono::duration< double > & | current_duration () const |
| const std::chrono::duration< double > & | average_duration () const |
| const std::chrono::duration< double > & | total_duration () const |
Records the number of profiler measurements (start/stop pairs) and the average duration between each start and stop call.
|
inlineexplicit |
Constructs a SolveProfiler.
| name | Name of measurement to show in diagnostics. |
Returns the average solve duration in seconds.
Returns the most recent solve duration in seconds.
|
inline |
Returns name of measurement to show in diagnostics.
|
inline |
Returns the number of solves.
|
inline |
Stops solve time measurement, increments the number of averages, and incorporates the latest measurement into the average.
Returns the sum of all solve durations in seconds.