cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
i_benchmark_case.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
24
25namespace stat_bench {
26namespace bench_impl {
27
31class IBenchmarkCase {
32public:
38 [[nodiscard]] virtual auto info() const noexcept
39 -> const BenchmarkFullName& = 0;
40
46 [[nodiscard]] virtual auto params() const noexcept
47 -> const param::ParameterConfig& = 0;
48
52 virtual void execute() = 0;
53
54 IBenchmarkCase(const IBenchmarkCase&) = delete;
55 IBenchmarkCase(IBenchmarkCase&&) = delete;
56 auto operator=(const IBenchmarkCase&) -> IBenchmarkCase& = delete;
57 auto operator=(IBenchmarkCase&&) -> IBenchmarkCase& = delete;
58
62 virtual ~IBenchmarkCase() = default;
63
64protected:
68 IBenchmarkCase() = default;
69};
70
71} // namespace bench_impl
72} // namespace stat_bench
Definition of BenchmarkFullName class.
Class of information of cases in benchmarks.
virtual auto info() const noexcept -> const BenchmarkFullName &=0
Get information of this case.
virtual void execute()=0
Execute this case.
virtual auto params() const noexcept -> const param::ParameterConfig &=0
Get parameters.
Namespace of internal implementation.
Namespace of parameters of benchmarks.
Namespace of stat_bench source codes.
Definition of ParameterConfig class.