Rapicorn - Experimental UI Toolkit - Source Code  13.07.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions
Rapicorn::Test::Timer Class Reference

Class for profiling benchmark tests. More...

#include <testutils.hh>

List of all members.

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)

Detailed Description

Class for profiling benchmark tests.

UseCase: Benchmarking function implementations, e.g. to compare sorting implementations.


Member Function Documentation

template<typename Callee >
double Rapicorn::Test::Timer::benchmark ( Callee  callee)
Parameters:
calleeA callable function or object. Method to benchmark the execution time of callee.
Returns:
Minimum runtime in seconds,

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines