cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
benchmark_full_name.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 <utility>
23
24#include <fmt/base.h>
25
28
29namespace stat_bench {
30
35public:
44 : group_name_(std::move(group_name)),
45 case_name_(std::move(case_name)) {}
46
52 [[nodiscard]] auto group_name() const noexcept
53 -> const BenchmarkGroupName& {
54 return group_name_;
55 }
56
62 [[nodiscard]] auto case_name() const noexcept -> const BenchmarkCaseName& {
63 return case_name_;
64 }
65
66private:
68 BenchmarkGroupName group_name_;
69
71 BenchmarkCaseName case_name_;
72};
73
74} // namespace stat_bench
75
76namespace fmt {
77
82template <>
83struct formatter<stat_bench::BenchmarkFullName>
84 : public formatter<string_view> {
94 format_context& context) const -> format_context::iterator;
95};
96
97} // namespace fmt
Definition of BenchmarkCaseName class.
Definition of BenchmarkGroupName class.
Class of names of cases of benchmarks.
Class of information of cases in benchmarks.
auto group_name() const noexcept -> const BenchmarkGroupName &
Get the name of the group of cases.
BenchmarkFullName(BenchmarkGroupName group_name, BenchmarkCaseName case_name) noexcept
Constructor.
auto case_name() const noexcept -> const BenchmarkCaseName &
Get the name of the case in the benchmark.
Class of names of groups of benchmarks.
Namespace of fmt library.
Namespace of stat_bench source codes.
auto format(const stat_bench::BenchmarkFullName &val, format_context &context) const -> format_context::iterator
Format.