cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
stat_bench::bench_impl::BenchmarkCaseRegistry Class Reference

Class of registry of cases of benchmarks. More...

#include <stat_bench/bench_impl/benchmark_case_registry.h>

+ Collaboration diagram for stat_bench::bench_impl::BenchmarkCaseRegistry:

Public Member Functions

 BenchmarkCaseRegistry ()=default
 Constructor.
 
void add (std::shared_ptr< IBenchmarkCase > bench_case)
 Add a case.
 
auto add_or_get_group (const BenchmarkGroupName &name) -> BenchmarkGroup &
 Add a group if not exists, and return it.
 
auto benchmarks () const noexcept -> const util::OrderedMap< BenchmarkGroupName, BenchmarkGroup > &
 Get benchmarks.
 
void filter_by (const filters::ComposedFilter &filter)
 Filter.
 

Static Public Member Functions

static auto instance () -> BenchmarkCaseRegistry &
 Get an instance of the registry.
 

Detailed Description

Class of registry of cases of benchmarks.

Definition at line 36 of file benchmark_case_registry.h.

Member Function Documentation

◆ add()

void stat_bench::bench_impl::BenchmarkCaseRegistry::add ( std::shared_ptr< IBenchmarkCase > bench_case)

Add a case.

Parameters
[in]bench_caseCase.

Definition at line 31 of file benchmark_case_registry.cpp.

◆ add_or_get_group()

auto stat_bench::bench_impl::BenchmarkCaseRegistry::add_or_get_group ( const BenchmarkGroupName & name) -> BenchmarkGroup&

Add a group if not exists, and return it.

Parameters
[in]nameName of the group.
Returns
Group.

Definition at line 37 of file benchmark_case_registry.cpp.

◆ benchmarks()

auto stat_bench::bench_impl::BenchmarkCaseRegistry::benchmarks ( ) const -> const util::OrderedMap<BenchmarkGroupName, BenchmarkGroup>&
nodiscardnoexcept

Get benchmarks.

Returns
Benchmarks per group.

Definition at line 55 of file benchmark_case_registry.cpp.

◆ filter_by()

void stat_bench::bench_impl::BenchmarkCaseRegistry::filter_by ( const filters::ComposedFilter & filter)

Filter.

Parameters
[in]filterFilter.

Definition at line 43 of file benchmark_case_registry.cpp.

◆ instance()

auto stat_bench::bench_impl::BenchmarkCaseRegistry::instance ( ) -> BenchmarkCaseRegistry&
staticnodiscard

Get an instance of the registry.

Returns
Reference to the instance.

Definition at line 60 of file benchmark_case_registry.cpp.


The documentation for this class was generated from the following files: