cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
parameter_to_time_violin_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
28
29namespace stat_bench {
30namespace plots {
31
35class ParameterToTimeViolinPlot final : public IPlot {
36public:
44 param::ParameterName parameter_name, PlotOptions options);
45
48 auto operator=(const ParameterToTimeViolinPlot&)
49 -> ParameterToTimeViolinPlot& = delete;
50 auto operator=(ParameterToTimeViolinPlot&&)
51 -> ParameterToTimeViolinPlot& = delete;
52
56 ~ParameterToTimeViolinPlot() override = default;
57
59 [[nodiscard]] auto name_for_file() const
60 -> const util::Utf8String& override;
61
63 void write(const measurer::MeasurerName& measurer_name,
64 const BenchmarkGroupName& group_name,
65 const std::vector<measurer::Measurement>& measurements,
66 const std::string& file_path) override;
67
68private:
76 [[nodiscard]] static auto create_name_for_file(
77 const param::ParameterName& parameter_name, const PlotOptions& options)
78 -> util::Utf8String;
79
81 param::ParameterName parameter_name_;
82
84 PlotOptions options_;
85
87 util::Utf8String name_for_file_;
88};
89
90} // namespace plots
91} // namespace stat_bench
Class of names of groups of benchmarks.
Class of options for plots.
Class of names of parameters.
IPlot()=default
Constructor.
auto name_for_file() const -> const util::Utf8String &override
Get a name for output files.
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.
~ParameterToTimeViolinPlot() override=default
Destructor.
ParameterToTimeViolinPlot(param::ParameterName parameter_name, PlotOptions options)
Constructor.
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.