24#include <fmt/format.h>
41 if (bench_case->info().group_name() != name_) {
43 fmt::format(
"Different name of benchmark group to add (Expected: "
45 name_, bench_case->info().group_name()));
48 const auto& case_name = bench_case->info().case_name();
49 const auto [iter, inserted] = cases_.try_emplace(case_name, bench_case);
52 fmt::format(
"Duplicate benchmark name {}.", bench_case->info()));
57 for (
auto iter = cases_.begin(); iter < cases_.end();) {
58 if (filter.
check((*iter->second).info())) {
61 iter = cases_.erase(iter);
Definition of BenchmarkCaseName class.
Definition of BenchmarkFullName class.
Definition of BenchmarkGroup class.
Class of names of cases of benchmarks.
Class of names of groups of benchmarks.
Class of exceptions in this library.
Class of configuration of a group of cases in benchmarks.
auto config() noexcept -> BenchmarkGroupConfig &
Get the configuration.
void add(std::shared_ptr< IBenchmarkCase > bench_case)
Add a case.
auto name() const noexcept -> const BenchmarkGroupName &
Get the group name.
void filter_by(const filters::ComposedFilter &filter)
Filter.
auto cases() const noexcept -> const util::OrderedMap< BenchmarkCaseName, std::shared_ptr< IBenchmarkCase > > &
Get cases.
BenchmarkGroup(BenchmarkGroupName name)
Constructor.
Interface of cases in benchmarks.
Class of composed filters of benchmarks.
auto check(const BenchmarkFullName &name) const -> bool
Check whether a name matches to this filter.
Namespace of internal implementation.
Namespace of utility functions and classes.
Namespace of stat_bench source codes.
Definition of StatBenchException class.