wreport::benchmark::Benchmark Struct Referenceabstract

Base class for all benchmarks. More...

`#include <benchmark.h>`

## Public Member Functions

| Benchmark (const std::string &name)
virtual void | setup_main ()
| Set up the environment for this benchmark.
virtual void | teardown_main ()
| Tear down the environment for this benchmark.
virtual void | setup_iteration ()
| Set up the environment for an iteration of this benchmark.
virtual void | teardown_iteration ()
| Tear down the environment for an iteration of this benchmark.
void | run (Progress &progress)
| Run the benchmark and collect timings.
void | print_timings ()
| Print timings to stdout.
virtual void | main ()=0
| Main body of this benchmark.

## Data Fields

std::string | name
unsigned | repetitions = 10
std::vector< Task * > | tasks
Task | task_main

## Detailed Description

Base class for all benchmarks.

## Member Function Documentation

## setup_iteration()

virtual void wreport::benchmark::Benchmark::setup_iteration | ( |  | ) |

inline virtual

Set up the environment for an iteration of this benchmark.

This is run outside of timings. By default it does nothing.

## setup_main()

virtual void wreport::benchmark::Benchmark::setup_main | ( |  | ) |

inline virtual

Set up the environment for this benchmark.

This is run outside of timings. By default it does nothing.

## teardown_iteration()

virtual void wreport::benchmark::Benchmark::teardown_iteration | ( |  | ) |

inline virtual

Tear down the environment for an iteration of this benchmark.

This is run outside of timings. By default it does nothing.

## teardown_main()

virtual void wreport::benchmark::Benchmark::teardown_main | ( |  | ) |

inline virtual

Tear down the environment for this benchmark.

This is run outside of timings. By default it does nothing.

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

- benchmark.h