wreport::benchmark::Registry Struct Reference

Collect all existing benchmarks. More...

`#include <benchmark.h>`

## Public Member Functions

void | add (Benchmark *b)
| Add a benchmark to this registry.

## Static Public Member Functions

static Registry & | get ()
| Get the static instance of the registry.
static void | basic_run (int argc, const char *argv[])
| Basic implementation of a main function that runs all benchmarks linked into the program.

## Data Fields

std::vector< Benchmark * > | benchmarks

## Detailed Description

Collect all existing benchmarks.

## Member Function Documentation

## basic_run()

void wreport::benchmark::Registry::basic_run | ( | int | argc,
|  | const char * | argv[] )

static

Basic implementation of a main function that runs all benchmarks linked into the program.

This allows to make a benchmark runner tool with just this code:

#include <wreport/benchmark.h>
int main (int argc, const char* argv[])
{
wreport::benchmark::Registry::basic_run(argc, argv);
}
benchmark.h
Simple benchmark infrastructure.
wreport::benchmark::Registry::basic_run
static void basic_run(int argc, const char *argv[])
Basic implementation of a main function that runs all benchmarks linked into the program.

If you need different logic in your benchmark running code, you can use the source code of basic_run as a template for writing your own.

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

- benchmark.h