36 -> std::unordered_map<util::Utf8String, util::Utf8String> {
37 return params.as_string_dict();
42 static_cast<float>(
stat.max()),
static_cast<float>(
stat.min()),
43 static_cast<float>(
stat.median()),
static_cast<float>(
stat.variance()),
44 static_cast<float>(
stat.standard_deviation()),
45 static_cast<float>(
stat.standard_error())};
48auto convert(
const std::vector<std::vector<clock::Duration>>& durations,
50 std::vector<std::vector<float>> values;
51 values.reserve(durations.size());
52 for (
const auto& durations_per_thread : durations) {
53 values.emplace_back();
54 auto& values_per_thread = values.back();
55 values_per_thread.reserve(durations_per_thread.size());
56 for (
const auto& duration : durations_per_thread) {
57 values_per_thread.push_back(
static_cast<float>(duration.seconds()));
63auto convert(
const std::shared_ptr<stat::CustomStatOutput>& stat_output,
65 std::vector<std::vector<float>> data;
66 data.reserve(stat_output->data().size());
67 for (
const auto& vec : stat_output->data()) {
68 std::vector<float> vec_copy;
69 vec_copy.reserve(vec.size());
70 for (
const double val : vec) {
71 vec_copy.push_back(
static_cast<float>(val));
73 data.push_back(std::move(vec_copy));
79 const std::vector<std::shared_ptr<stat::CustomStatOutput>>& stat_outputs,
80 const std::vector<stat::Statistics>& stats)
81 -> std::vector<CustomStatOutputData> {
82 std::vector<CustomStatOutputData> data;
83 data.reserve(stat_outputs.size());
84 for (std::size_t i = 0; i < stat_outputs.size(); ++i) {
85 data.push_back(
convert(stat_outputs.at(i), stats.at(i)));
90auto convert(
const std::vector<std::pair<CustomOutputName, double>>& outputs)
91 -> std::vector<CustomOutputData> {
92 std::vector<CustomOutputData> data;
93 data.reserve(outputs.size());
94 for (
const auto& output : outputs) {
96 output.first.str(),
static_cast<float>(output.second)});
103 measurement.case_info().case_name().str(),
104 convert(measurement.cond().params()), measurement.measurer_name().str(),
105 measurement.iterations(), measurement.samples(),
106 convert(measurement.durations(), measurement.durations_stat()),
107 convert(measurement.custom_stat_outputs(), measurement.custom_stat()),
108 convert(measurement.custom_outputs())};
Definition of BenchmarkCaseName class.
Definition of BenchmarkCondition class.
Definition of BenchmarkFullName class.
Definition of BenchmarkGroupName class.
Class of data of measurements.
Class of dictionaries of parameters.
Class to calculate statistics.
Declaration of functions to help output of data files.
Definition of MeasurerName class.
Namespace of specification of data files.
auto convert(const param::ParameterDict ¶ms) -> std::unordered_map< util::Utf8String, util::Utf8String >
Convert to data for data files.
Namespace of reporters of results of benchmarks.
Namespace of stat_bench source codes.
Struct of custom outputs without statistics.
Struct of custom outputs with statistics.
Struct of data in one case.
Struct of data of statistics.