Rapicorn - Experimental UI Toolkit - Source Code
13.07.0
|
Class for profiling benchmark tests. More...
#include <testutils.hh>
Public Member Functions | |
Timer (double deadline_in_secs=0) | |
Create a Timer() instance, specifying an optional upper bound for test durations. | |
int64 | n_runs () const |
Number of benchmark runs executed. | |
double | test_elapsed () const |
Seconds spent in benchmark() | |
double | min_elapsed () const |
Minimum time benchmarked for a callee() call. | |
double | max_elapsed () const |
Maximum time benchmarked for a callee() call. | |
template<typename Callee > | |
double | benchmark (Callee callee) |
Class for profiling benchmark tests.
UseCase: Benchmarking function implementations, e.g. to compare sorting implementations.
double Rapicorn::Test::Timer::benchmark | ( | Callee | callee | ) |
callee | A callable function or object. Method to benchmark the execution time of callee. |