cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
parameter_to_output_line_plot.h
Go to the documentation of this file.
1/*
2 * Copyright 2025 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 <string>
23
29
30namespace stat_bench {
31namespace plots {
32
36class ParameterToOutputLinePlot final : public IPlot {
37public:
46 CustomOutputName custom_output_name, PlotOptions options);
47
50 auto operator=(const ParameterToOutputLinePlot&)
51 -> ParameterToOutputLinePlot& = delete;
52 auto operator=(ParameterToOutputLinePlot&&)
53 -> ParameterToOutputLinePlot& = delete;
54
58 ~ParameterToOutputLinePlot() override = default;
59
61 [[nodiscard]] auto name_for_file() const
62 -> const util::Utf8String& override;
63
65 void write(const measurer::MeasurerName& measurer_name,
66 const BenchmarkGroupName& group_name,
67 const std::vector<measurer::Measurement>& measurements,
68 const std::string& file_path) override;
69
70private:
79 [[nodiscard]] static auto create_name_for_file(
80 const param::ParameterName& parameter_name,
81 const CustomOutputName& custom_output_name, const PlotOptions& options)
82 -> util::Utf8String;
83
85 param::ParameterName parameter_name_;
86
88 CustomOutputName custom_output_name_;
89
91 PlotOptions options_;
92
94 util::Utf8String name_for_file_;
95};
96
97} // namespace plots
98} // namespace stat_bench
Class of names of groups of benchmarks.
Class of names of custom outputs.
Class of options for plots.
Class of names of parameters.
IPlot()=default
Constructor.
~ParameterToOutputLinePlot() override=default
Destructor.
void write(const measurer::MeasurerName &measurer_name, const BenchmarkGroupName &group_name, const std::vector< measurer::Measurement > &measurements, const std::string &file_path) override
Write a plot.
ParameterToOutputLinePlot(param::ParameterName parameter_name, CustomOutputName custom_output_name, PlotOptions options)
Constructor.
auto name_for_file() const -> const util::Utf8String &override
Get a name for output files.
Definition of CustomOutputName class.
Definition of IPlot class.
Namespace of classes to measure time in benchmarks.
Namespace of parameters of benchmarks.
Namespace of plotting.
Definition box_plot.h:28
Namespace of utility functions and classes.
Namespace of stat_bench source codes.
STL namespace.
Definition of ParameterName class.
Definition of PlotOptions class.
Definition of Utf8String class.