cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
benchmark_group.h
Go to the documentation of this file.
1/*
2 * Copyright 2021 MusicScience37 (Kenta Kabashima)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
20#pragma once
21
22#include <memory>
23
30
31namespace stat_bench {
32namespace bench_impl {
33
38public:
45
51 [[nodiscard]] auto name() const noexcept -> const BenchmarkGroupName&;
52
58 void add(std::shared_ptr<IBenchmarkCase> bench_case);
59
65 void filter_by(const filters::ComposedFilter& filter);
66
72 [[nodiscard]] auto cases() const noexcept -> const
74
80 [[nodiscard]] auto config() noexcept -> BenchmarkGroupConfig&;
81
87 [[nodiscard]] auto config() const noexcept -> const BenchmarkGroupConfig&;
88
89private:
92
95 cases_{};
96
98 BenchmarkGroupConfig config_{};
99};
100
101} // namespace bench_impl
102} // namespace stat_bench
Definition of BenchmarkCaseName class.
Definition of BenchmarkGroupConfig class.
Definition of BenchmarkGroupName class.
Class of names of groups of benchmarks.
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.
Class of composed filters of benchmarks.
Class of mapping which preserves order of insertion.
Definition ordered_map.h:39
Definition of ComposedFilter class.
Definition of IBenchmarkCase class.
Namespace of internal implementation.
Namespace of stat_bench source codes.
Definition of OrderedMap class.