eztimer
Easy timing of C++ functions
Loading...
Searching...
No Matches
eztimer::Options Struct Reference

Options for time(). More...

#include <eztimer.hpp>

Public Attributes

int iterations = 10
 
int burn_in = 1
 
unsigned long long seed = 123456
 
std::optional< std::chrono::duration< double > > max_time_per_function
 
std::optional< std::chrono::duration< double > > max_time_total
 
std::function< void()> setup
 

Detailed Description

Member Data Documentation

◆ burn_in

int eztimer::Options::burn_in = 1

Number of burn-in iterations to run each function before timing. Times for these iterations are not reported.

◆ iterations

int eztimer::Options::iterations = 10

Maximum number of iterations to run each function. This does not include the burn_in iterations.

◆ max_time_per_function

std::optional<std::chrono::duration<double> > eztimer::Options::max_time_per_function

Maximum time to run each function, in seconds. Once this is exceeded, all remaining iterations are skipped for that function.

Time for burn-in iterations is not included here.

Ignored if not set.

◆ max_time_total

std::optional<std::chrono::duration<double> > eztimer::Options::max_time_total

Maximum time to run time(), in seconds. Once this is exceeded, all remaining calls of all functions are skipped.

Time for burn-in iterations is not included here.

Ignored if not set.

◆ seed

unsigned long long eztimer::Options::seed = 123456

Seed for the random number generator, used to randomize the function execution order at each iteration.

◆ setup

std::function<void()> eztimer::Options::setup

Setup function to run before each iteration of function calls. This is not included in the timing for any function.

Ignored if not set.


The documentation for this struct was generated from the following file: