Class Ase::Test::Timer
ClassList > Ase > Test > Timer
#include <testing.hh>
Public Functions
Type | Name |
---|---|
Timer (double deadline_in_secs=0) Create a Timer() instance, specifying an optional upper bound for test durations. |
|
double | benchmark (Callee callee) |
double | max_elapsed () const Maximum time benchmarked for a callee() call. |
double | min_elapsed () const Minimum time benchmarked for a callee() call. |
int64 | n_reps () const Number of benchmark repetitions to execute. |
double | test_elapsed () const Seconds spent in benchmark() __ |
virtual | ~Timer () |
Detailed Description
Class for profiling benchmark tests. UseCase: Benchmarking function implementations, e.g. to compare sorting implementations.
Public Functions Documentation
function Timer
explicit Ase::Test::Timer::Timer (
double deadline_in_secs=0
)
function benchmark
template<typename Callee>
double Ase::Test::Timer::benchmark (
Callee callee
)
Parameters:
callee
A callable function or object. Method to benchmark the execution time of callee.
Returns:
Minimum runtime in seconds,
function max_elapsed
double Ase::Test::Timer::max_elapsed () const
function min_elapsed
double Ase::Test::Timer::min_elapsed () const
function n_reps
inline int64 Ase::Test::Timer::n_reps () const
function test_elapsed
inline double Ase::Test::Timer::test_elapsed () const
function ~Timer
virtual Ase::Test::Timer::~Timer ()
The documentation for this class was generated from the following file /__w/anklang/anklang/ase/testing.hh