Unverified Commit 4c2e32f1 by Roman Lebedev Committed by GitHub

Introduce "family index" field into JSON output (#1164)

It may be useful for those wishing to further post-process JSON results, but it is mainly geared towards better support for run interleaving, where results from the same family may not be close-by in the JSON. While we won't be able to do much about that for outputs, the tools can and perhaps should reorder the results to that at least in their output they are in proper order, not run order. Note that this only counts the families that were filtered-in, so if e.g. there were three families, and we filtered-out the second one, the two families (which were first and third) will have family indexes 0 and 1.
parent e0a080d0
...@@ -1418,6 +1418,7 @@ class BenchmarkReporter { ...@@ -1418,6 +1418,7 @@ class BenchmarkReporter {
std::string benchmark_name() const; std::string benchmark_name() const;
BenchmarkName run_name; BenchmarkName run_name;
int64_t family_index;
RunType run_type; RunType run_type;
std::string aggregate_name; std::string aggregate_name;
std::string report_label; // Empty if not set by benchmark. std::string report_label; // Empty if not set by benchmark.
......
...@@ -7,10 +7,11 @@ ...@@ -7,10 +7,11 @@
namespace benchmark { namespace benchmark {
namespace internal { namespace internal {
BenchmarkInstance::BenchmarkInstance(Benchmark* benchmark, BenchmarkInstance::BenchmarkInstance(Benchmark* benchmark, int family_idx,
const std::vector<int64_t>& args, const std::vector<int64_t>& args,
int thread_count) int thread_count)
: benchmark_(*benchmark), : benchmark_(*benchmark),
family_index_(family_idx),
aggregation_report_mode_(benchmark_.aggregation_report_mode_), aggregation_report_mode_(benchmark_.aggregation_report_mode_),
args_(args), args_(args),
time_unit_(benchmark_.time_unit_), time_unit_(benchmark_.time_unit_),
......
...@@ -17,10 +17,11 @@ namespace internal { ...@@ -17,10 +17,11 @@ namespace internal {
// Information kept per benchmark we may want to run // Information kept per benchmark we may want to run
class BenchmarkInstance { class BenchmarkInstance {
public: public:
BenchmarkInstance(Benchmark* benchmark, const std::vector<int64_t>& args, BenchmarkInstance(Benchmark* benchmark, int family_index,
int threads); const std::vector<int64_t>& args, int threads);
const BenchmarkName& name() const { return name_; } const BenchmarkName& name() const { return name_; }
int family_index() const { return family_index_; }
AggregationReportMode aggregation_report_mode() const { AggregationReportMode aggregation_report_mode() const {
return aggregation_report_mode_; return aggregation_report_mode_;
} }
...@@ -45,6 +46,7 @@ class BenchmarkInstance { ...@@ -45,6 +46,7 @@ class BenchmarkInstance {
private: private:
BenchmarkName name_; BenchmarkName name_;
Benchmark& benchmark_; Benchmark& benchmark_;
const int family_index_;
AggregationReportMode aggregation_report_mode_; AggregationReportMode aggregation_report_mode_;
const std::vector<int64_t>& args_; const std::vector<int64_t>& args_;
TimeUnit time_unit_; TimeUnit time_unit_;
......
...@@ -129,8 +129,12 @@ bool BenchmarkFamilies::FindBenchmarks( ...@@ -129,8 +129,12 @@ bool BenchmarkFamilies::FindBenchmarks(
// Special list of thread counts to use when none are specified // Special list of thread counts to use when none are specified
const std::vector<int> one_thread = {1}; const std::vector<int> one_thread = {1};
int next_family_index = 0;
MutexLock l(mutex_); MutexLock l(mutex_);
for (std::unique_ptr<Benchmark>& family : families_) { for (std::unique_ptr<Benchmark>& family : families_) {
int family_index = next_family_index;
// Family was deleted or benchmark doesn't match // Family was deleted or benchmark doesn't match
if (!family) continue; if (!family) continue;
...@@ -154,13 +158,18 @@ bool BenchmarkFamilies::FindBenchmarks( ...@@ -154,13 +158,18 @@ bool BenchmarkFamilies::FindBenchmarks(
for (auto const& args : family->args_) { for (auto const& args : family->args_) {
for (int num_threads : *thread_counts) { for (int num_threads : *thread_counts) {
BenchmarkInstance instance(family.get(), args, num_threads); BenchmarkInstance instance(family.get(), family_index, args,
num_threads);
const auto full_name = instance.name().str(); const auto full_name = instance.name().str();
if ((re.Match(full_name) && !isNegativeFilter) || if ((re.Match(full_name) && !isNegativeFilter) ||
(!re.Match(full_name) && isNegativeFilter)) { (!re.Match(full_name) && isNegativeFilter)) {
instance.last_benchmark_instance = (&args == &family->args_.back()); instance.last_benchmark_instance = (&args == &family->args_.back());
benchmarks->push_back(std::move(instance)); benchmarks->push_back(std::move(instance));
// Only bump the next family index once we've estabilished that
// at least one instance of this family will be run.
if (next_family_index == family_index) ++next_family_index;
} }
} }
} }
......
...@@ -72,6 +72,7 @@ BenchmarkReporter::Run CreateRunReport( ...@@ -72,6 +72,7 @@ BenchmarkReporter::Run CreateRunReport(
BenchmarkReporter::Run report; BenchmarkReporter::Run report;
report.run_name = b.name(); report.run_name = b.name();
report.family_index = b.family_index();
report.error_occurred = results.has_error_; report.error_occurred = results.has_error_;
report.error_message = results.error_message_; report.error_message = results.error_message_;
report.report_label = results.report_label_; report.report_label = results.report_label_;
......
...@@ -193,6 +193,7 @@ std::vector<BenchmarkReporter::Run> ComputeBigO( ...@@ -193,6 +193,7 @@ std::vector<BenchmarkReporter::Run> ComputeBigO(
// Get the data from the accumulator to BenchmarkReporter::Run's. // Get the data from the accumulator to BenchmarkReporter::Run's.
Run big_o; Run big_o;
big_o.run_name = run_name; big_o.run_name = run_name;
big_o.family_index = reports[0].family_index;
big_o.run_type = BenchmarkReporter::Run::RT_Aggregate; big_o.run_type = BenchmarkReporter::Run::RT_Aggregate;
big_o.repetitions = reports[0].repetitions; big_o.repetitions = reports[0].repetitions;
big_o.repetition_index = Run::no_repetition_index; big_o.repetition_index = Run::no_repetition_index;
...@@ -215,6 +216,7 @@ std::vector<BenchmarkReporter::Run> ComputeBigO( ...@@ -215,6 +216,7 @@ std::vector<BenchmarkReporter::Run> ComputeBigO(
// Only add label to mean/stddev if it is same for all runs // Only add label to mean/stddev if it is same for all runs
Run rms; Run rms;
rms.run_name = run_name; rms.run_name = run_name;
rms.family_index = reports[0].family_index;
rms.run_type = BenchmarkReporter::Run::RT_Aggregate; rms.run_type = BenchmarkReporter::Run::RT_Aggregate;
rms.aggregate_name = "RMS"; rms.aggregate_name = "RMS";
rms.report_label = big_o.report_label; rms.report_label = big_o.report_label;
......
...@@ -207,6 +207,7 @@ void JSONReporter::PrintRunData(Run const& run) { ...@@ -207,6 +207,7 @@ void JSONReporter::PrintRunData(Run const& run) {
std::string indent(6, ' '); std::string indent(6, ' ');
std::ostream& out = GetOutputStream(); std::ostream& out = GetOutputStream();
out << indent << FormatKV("name", run.benchmark_name()) << ",\n"; out << indent << FormatKV("name", run.benchmark_name()) << ",\n";
out << indent << FormatKV("family_index", run.family_index) << ",\n";
out << indent << FormatKV("run_name", run.run_name.str()) << ",\n"; out << indent << FormatKV("run_name", run.run_name.str()) << ",\n";
out << indent << FormatKV("run_type", [&run]() -> const char* { out << indent << FormatKV("run_type", [&run]() -> const char* {
switch (run.run_type) { switch (run.run_type) {
......
...@@ -148,6 +148,7 @@ std::vector<BenchmarkReporter::Run> ComputeStats( ...@@ -148,6 +148,7 @@ std::vector<BenchmarkReporter::Run> ComputeStats(
// Get the data from the accumulator to BenchmarkReporter::Run's. // Get the data from the accumulator to BenchmarkReporter::Run's.
Run data; Run data;
data.run_name = reports[0].run_name; data.run_name = reports[0].run_name;
data.family_index = reports[0].family_index;
data.run_type = BenchmarkReporter::Run::RT_Aggregate; data.run_type = BenchmarkReporter::Run::RT_Aggregate;
data.threads = reports[0].threads; data.threads = reports[0].threads;
data.repetitions = reports[0].repetitions; data.repetitions = reports[0].repetitions;
......
...@@ -20,6 +20,7 @@ TEST_ARGS = ["--benchmark_min_time=0.01"] ...@@ -20,6 +20,7 @@ TEST_ARGS = ["--benchmark_min_time=0.01"]
PER_SRC_TEST_ARGS = ({ PER_SRC_TEST_ARGS = ({
"user_counters_tabular_test.cc": ["--benchmark_counters_tabular=true"], "user_counters_tabular_test.cc": ["--benchmark_counters_tabular=true"],
"repetitions_test.cc": [" --benchmark_repetitions=3"],
}) })
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
......
...@@ -13,7 +13,8 @@ namespace { ...@@ -13,7 +13,8 @@ namespace {
int CONCAT(dummy, __LINE__) = AddComplexityTest(__VA_ARGS__) int CONCAT(dummy, __LINE__) = AddComplexityTest(__VA_ARGS__)
int AddComplexityTest(std::string test_name, std::string big_o_test_name, int AddComplexityTest(std::string test_name, std::string big_o_test_name,
std::string rms_test_name, std::string big_o) { std::string rms_test_name, std::string big_o,
int family_index) {
SetSubstitutions({{"%name", test_name}, SetSubstitutions({{"%name", test_name},
{"%bigo_name", big_o_test_name}, {"%bigo_name", big_o_test_name},
{"%rms_name", rms_test_name}, {"%rms_name", rms_test_name},
...@@ -25,25 +26,29 @@ int AddComplexityTest(std::string test_name, std::string big_o_test_name, ...@@ -25,25 +26,29 @@ int AddComplexityTest(std::string test_name, std::string big_o_test_name,
{{"^%bigo_name %bigo_str %bigo_str[ ]*$"}, {{"^%bigo_name %bigo_str %bigo_str[ ]*$"},
{"^%bigo_name", MR_Not}, // Assert we we didn't only matched a name. {"^%bigo_name", MR_Not}, // Assert we we didn't only matched a name.
{"^%rms_name %rms %rms[ ]*$", MR_Next}}); {"^%rms_name %rms %rms[ ]*$", MR_Next}});
AddCases(TC_JSONOut, {{"\"name\": \"%bigo_name\",$"}, AddCases(
{"\"run_name\": \"%name\",$", MR_Next}, TC_JSONOut,
{"\"run_type\": \"aggregate\",$", MR_Next}, {{"\"name\": \"%bigo_name\",$"},
{"\"repetitions\": %int,$", MR_Next}, {"\"family_index\": " + std::to_string(family_index) + ",$", MR_Next},
{"\"threads\": 1,$", MR_Next}, {"\"run_name\": \"%name\",$", MR_Next},
{"\"aggregate_name\": \"BigO\",$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"\"cpu_coefficient\": %float,$", MR_Next}, {"\"repetitions\": %int,$", MR_Next},
{"\"real_coefficient\": %float,$", MR_Next}, {"\"threads\": 1,$", MR_Next},
{"\"big_o\": \"%bigo\",$", MR_Next}, {"\"aggregate_name\": \"BigO\",$", MR_Next},
{"\"time_unit\": \"ns\"$", MR_Next}, {"\"cpu_coefficient\": %float,$", MR_Next},
{"}", MR_Next}, {"\"real_coefficient\": %float,$", MR_Next},
{"\"name\": \"%rms_name\",$"}, {"\"big_o\": \"%bigo\",$", MR_Next},
{"\"run_name\": \"%name\",$", MR_Next}, {"\"time_unit\": \"ns\"$", MR_Next},
{"\"run_type\": \"aggregate\",$", MR_Next}, {"}", MR_Next},
{"\"repetitions\": %int,$", MR_Next}, {"\"name\": \"%rms_name\",$"},
{"\"threads\": 1,$", MR_Next}, {"\"family_index\": " + std::to_string(family_index) + ",$", MR_Next},
{"\"aggregate_name\": \"RMS\",$", MR_Next}, {"\"run_name\": \"%name\",$", MR_Next},
{"\"rms\": %float$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"}", MR_Next}}); {"\"repetitions\": %int,$", MR_Next},
{"\"threads\": 1,$", MR_Next},
{"\"aggregate_name\": \"RMS\",$", MR_Next},
{"\"rms\": %float$", MR_Next},
{"}", MR_Next}});
AddCases(TC_CSVOut, {{"^\"%bigo_name\",,%float,%float,%bigo,,,,,$"}, AddCases(TC_CSVOut, {{"^\"%bigo_name\",,%float,%float,%bigo,,,,,$"},
{"^\"%bigo_name\"", MR_Not}, {"^\"%bigo_name\"", MR_Not},
{"^\"%rms_name\",,%float,%float,,,,,,$", MR_Next}}); {"^\"%rms_name\",,%float,%float,,,,,,$", MR_Next}});
...@@ -82,15 +87,15 @@ const char *lambda_big_o_1 = "f\\(N\\)"; ...@@ -82,15 +87,15 @@ const char *lambda_big_o_1 = "f\\(N\\)";
// Add enum tests // Add enum tests
ADD_COMPLEXITY_CASES(one_test_name, big_o_1_test_name, rms_o_1_test_name, ADD_COMPLEXITY_CASES(one_test_name, big_o_1_test_name, rms_o_1_test_name,
enum_big_o_1); enum_big_o_1, /*family_index=*/0);
// Add auto enum tests // Add auto enum tests
ADD_COMPLEXITY_CASES(one_test_name, big_o_1_test_name, rms_o_1_test_name, ADD_COMPLEXITY_CASES(one_test_name, big_o_1_test_name, rms_o_1_test_name,
auto_big_o_1); auto_big_o_1, /*family_index=*/1);
// Add lambda tests // Add lambda tests
ADD_COMPLEXITY_CASES(one_test_name, big_o_1_test_name, rms_o_1_test_name, ADD_COMPLEXITY_CASES(one_test_name, big_o_1_test_name, rms_o_1_test_name,
lambda_big_o_1); lambda_big_o_1, /*family_index=*/2);
// ========================================================================= // // ========================================================================= //
// --------------------------- Testing BigO O(N) --------------------------- // // --------------------------- Testing BigO O(N) --------------------------- //
...@@ -137,11 +142,11 @@ const char *lambda_big_o_n = "f\\(N\\)"; ...@@ -137,11 +142,11 @@ const char *lambda_big_o_n = "f\\(N\\)";
// Add enum tests // Add enum tests
ADD_COMPLEXITY_CASES(n_test_name, big_o_n_test_name, rms_o_n_test_name, ADD_COMPLEXITY_CASES(n_test_name, big_o_n_test_name, rms_o_n_test_name,
enum_auto_big_o_n); enum_auto_big_o_n, /*family_index=*/3);
// Add lambda tests // Add lambda tests
ADD_COMPLEXITY_CASES(n_test_name, big_o_n_test_name, rms_o_n_test_name, ADD_COMPLEXITY_CASES(n_test_name, big_o_n_test_name, rms_o_n_test_name,
lambda_big_o_n); lambda_big_o_n, /*family_index=*/4);
// ========================================================================= // // ========================================================================= //
// ------------------------- Testing BigO O(N*lgN) ------------------------- // // ------------------------- Testing BigO O(N*lgN) ------------------------- //
...@@ -178,11 +183,13 @@ const char *lambda_big_o_n_lg_n = "f\\(N\\)"; ...@@ -178,11 +183,13 @@ const char *lambda_big_o_n_lg_n = "f\\(N\\)";
// Add enum tests // Add enum tests
ADD_COMPLEXITY_CASES(n_lg_n_test_name, big_o_n_lg_n_test_name, ADD_COMPLEXITY_CASES(n_lg_n_test_name, big_o_n_lg_n_test_name,
rms_o_n_lg_n_test_name, enum_auto_big_o_n_lg_n); rms_o_n_lg_n_test_name, enum_auto_big_o_n_lg_n,
/*family_index=*/6);
// Add lambda tests // Add lambda tests
ADD_COMPLEXITY_CASES(n_lg_n_test_name, big_o_n_lg_n_test_name, ADD_COMPLEXITY_CASES(n_lg_n_test_name, big_o_n_lg_n_test_name,
rms_o_n_lg_n_test_name, lambda_big_o_n_lg_n); rms_o_n_lg_n_test_name, lambda_big_o_n_lg_n,
/*family_index=*/7);
// ========================================================================= // // ========================================================================= //
// -------- Testing formatting of Complexity with captured args ------------ // // -------- Testing formatting of Complexity with captured args ------------ //
...@@ -204,7 +211,7 @@ const std::string complexity_capture_name = ...@@ -204,7 +211,7 @@ const std::string complexity_capture_name =
"BM_ComplexityCaptureArgs/capture_test"; "BM_ComplexityCaptureArgs/capture_test";
ADD_COMPLEXITY_CASES(complexity_capture_name, complexity_capture_name + "_BigO", ADD_COMPLEXITY_CASES(complexity_capture_name, complexity_capture_name + "_BigO",
complexity_capture_name + "_RMS", "N"); complexity_capture_name + "_RMS", "N", /*family_index=*/9);
// ========================================================================= // // ========================================================================= //
// --------------------------- TEST CASES END ------------------------------ // // --------------------------- TEST CASES END ------------------------------ //
......
#include "benchmark/benchmark.h" #include <algorithm>
#include <cassert> #include <cassert>
#include <cmath> #include <cmath>
#include <cstdint> #include <cstdint>
#include <cstdlib> #include <cstdlib>
#include <iostream> #include <iostream>
#include <limits> #include <limits>
#include <sstream> #include <sstream>
#include <string> #include <string>
#include "benchmark/benchmark.h"
namespace { namespace {
class TestReporter : public benchmark::ConsoleReporter { class TestReporter : public benchmark::ConsoleReporter {
...@@ -20,17 +20,22 @@ class TestReporter : public benchmark::ConsoleReporter { ...@@ -20,17 +20,22 @@ class TestReporter : public benchmark::ConsoleReporter {
virtual void ReportRuns(const std::vector<Run>& report) BENCHMARK_OVERRIDE { virtual void ReportRuns(const std::vector<Run>& report) BENCHMARK_OVERRIDE {
++count_; ++count_;
max_family_index_ =
std::max<size_t>(max_family_index_, report[0].family_index);
ConsoleReporter::ReportRuns(report); ConsoleReporter::ReportRuns(report);
}; };
TestReporter() : count_(0) {} TestReporter() : count_(0), max_family_index_(0) {}
virtual ~TestReporter() {} virtual ~TestReporter() {}
size_t GetCount() const { return count_; } size_t GetCount() const { return count_; }
size_t GetMaxFamilyIndex() const { return max_family_index_; }
private: private:
mutable size_t count_; mutable size_t count_;
mutable size_t max_family_index_;
}; };
} // end namespace } // end namespace
...@@ -98,6 +103,15 @@ int main(int argc, char **argv) { ...@@ -98,6 +103,15 @@ int main(int argc, char **argv) {
<< std::endl; << std::endl;
return -1; return -1;
} }
const size_t max_family_index = test_reporter.GetMaxFamilyIndex();
const size_t num_families = reports_count == 0 ? 0 : 1 + max_family_index;
if (num_families != expected_reports) {
std::cerr << "ERROR: Expected " << expected_reports
<< " test families to be run but num_families = "
<< num_families << std::endl;
return -1;
}
} }
return 0; return 0;
......
...@@ -21,6 +21,7 @@ BENCHMARK(BM_empty); ...@@ -21,6 +21,7 @@ BENCHMARK(BM_empty);
ADD_CASES(TC_ConsoleOut, {{"^BM_empty %console_report$"}}); ADD_CASES(TC_ConsoleOut, {{"^BM_empty %console_report$"}});
ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_empty\",$"}, ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_empty\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_empty\",$", MR_Next}, {"\"run_name\": \"BM_empty\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
......
...@@ -24,6 +24,7 @@ ADD_CASES(TC_ConsoleOut, ...@@ -24,6 +24,7 @@ ADD_CASES(TC_ConsoleOut,
{{"^BM_ExplicitRepetitions/repeats:2_stddev %console_report$"}}); {{"^BM_ExplicitRepetitions/repeats:2_stddev %console_report$"}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_ExplicitRepetitions/repeats:2\",$"}, {{"\"name\": \"BM_ExplicitRepetitions/repeats:2\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_ExplicitRepetitions/repeats:2\",$", MR_Next}, {"\"run_name\": \"BM_ExplicitRepetitions/repeats:2\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 2,$", MR_Next}, {"\"repetitions\": 2,$", MR_Next},
...@@ -36,6 +37,7 @@ ADD_CASES(TC_JSONOut, ...@@ -36,6 +37,7 @@ ADD_CASES(TC_JSONOut,
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_ExplicitRepetitions/repeats:2\",$"}, {{"\"name\": \"BM_ExplicitRepetitions/repeats:2\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_ExplicitRepetitions/repeats:2\",$", MR_Next}, {"\"run_name\": \"BM_ExplicitRepetitions/repeats:2\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 2,$", MR_Next}, {"\"repetitions\": 2,$", MR_Next},
...@@ -48,6 +50,7 @@ ADD_CASES(TC_JSONOut, ...@@ -48,6 +50,7 @@ ADD_CASES(TC_JSONOut,
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_ExplicitRepetitions/repeats:2_mean\",$"}, {{"\"name\": \"BM_ExplicitRepetitions/repeats:2_mean\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_ExplicitRepetitions/repeats:2\",$", MR_Next}, {"\"run_name\": \"BM_ExplicitRepetitions/repeats:2\",$", MR_Next},
{"\"run_type\": \"aggregate\",$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"\"repetitions\": 2,$", MR_Next}, {"\"repetitions\": 2,$", MR_Next},
...@@ -60,6 +63,7 @@ ADD_CASES(TC_JSONOut, ...@@ -60,6 +63,7 @@ ADD_CASES(TC_JSONOut,
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_ExplicitRepetitions/repeats:2_median\",$"}, {{"\"name\": \"BM_ExplicitRepetitions/repeats:2_median\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_ExplicitRepetitions/repeats:2\",$", MR_Next}, {"\"run_name\": \"BM_ExplicitRepetitions/repeats:2\",$", MR_Next},
{"\"run_type\": \"aggregate\",$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"\"repetitions\": 2,$", MR_Next}, {"\"repetitions\": 2,$", MR_Next},
...@@ -72,6 +76,7 @@ ADD_CASES(TC_JSONOut, ...@@ -72,6 +76,7 @@ ADD_CASES(TC_JSONOut,
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_ExplicitRepetitions/repeats:2_stddev\",$"}, {{"\"name\": \"BM_ExplicitRepetitions/repeats:2_stddev\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_ExplicitRepetitions/repeats:2\",$", MR_Next}, {"\"run_name\": \"BM_ExplicitRepetitions/repeats:2\",$", MR_Next},
{"\"run_type\": \"aggregate\",$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"\"repetitions\": 2,$", MR_Next}, {"\"repetitions\": 2,$", MR_Next},
...@@ -108,6 +113,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_ImplicitRepetitions_mean %console_report$"}}); ...@@ -108,6 +113,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_ImplicitRepetitions_mean %console_report$"}});
ADD_CASES(TC_ConsoleOut, {{"^BM_ImplicitRepetitions_median %console_report$"}}); ADD_CASES(TC_ConsoleOut, {{"^BM_ImplicitRepetitions_median %console_report$"}});
ADD_CASES(TC_ConsoleOut, {{"^BM_ImplicitRepetitions_stddev %console_report$"}}); ADD_CASES(TC_ConsoleOut, {{"^BM_ImplicitRepetitions_stddev %console_report$"}});
ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"}, ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"},
{"\"family_index\": 1,$", MR_Next},
{"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next}, {"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 3,$", MR_Next}, {"\"repetitions\": 3,$", MR_Next},
...@@ -119,6 +125,7 @@ ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"}, ...@@ -119,6 +125,7 @@ ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"},
{"\"time_unit\": \"ns\"$", MR_Next}, {"\"time_unit\": \"ns\"$", MR_Next},
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"}, ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"},
{"\"family_index\": 1,$", MR_Next},
{"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next}, {"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 3,$", MR_Next}, {"\"repetitions\": 3,$", MR_Next},
...@@ -130,6 +137,7 @@ ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"}, ...@@ -130,6 +137,7 @@ ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"},
{"\"time_unit\": \"ns\"$", MR_Next}, {"\"time_unit\": \"ns\"$", MR_Next},
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"}, ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"},
{"\"family_index\": 1,$", MR_Next},
{"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next}, {"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 3,$", MR_Next}, {"\"repetitions\": 3,$", MR_Next},
...@@ -141,6 +149,7 @@ ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"}, ...@@ -141,6 +149,7 @@ ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions\",$"},
{"\"time_unit\": \"ns\"$", MR_Next}, {"\"time_unit\": \"ns\"$", MR_Next},
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions_mean\",$"}, ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions_mean\",$"},
{"\"family_index\": 1,$", MR_Next},
{"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next}, {"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next},
{"\"run_type\": \"aggregate\",$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"\"repetitions\": 3,$", MR_Next}, {"\"repetitions\": 3,$", MR_Next},
...@@ -152,6 +161,7 @@ ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions_mean\",$"}, ...@@ -152,6 +161,7 @@ ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions_mean\",$"},
{"\"time_unit\": \"ns\"$", MR_Next}, {"\"time_unit\": \"ns\"$", MR_Next},
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions_median\",$"}, ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions_median\",$"},
{"\"family_index\": 1,$", MR_Next},
{"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next}, {"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next},
{"\"run_type\": \"aggregate\",$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"\"repetitions\": 3,$", MR_Next}, {"\"repetitions\": 3,$", MR_Next},
...@@ -163,6 +173,7 @@ ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions_median\",$"}, ...@@ -163,6 +173,7 @@ ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions_median\",$"},
{"\"time_unit\": \"ns\"$", MR_Next}, {"\"time_unit\": \"ns\"$", MR_Next},
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions_stddev\",$"}, ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_ImplicitRepetitions_stddev\",$"},
{"\"family_index\": 1,$", MR_Next},
{"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next}, {"\"run_name\": \"BM_ImplicitRepetitions\",$", MR_Next},
{"\"run_type\": \"aggregate\",$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"\"repetitions\": 3,$", MR_Next}, {"\"repetitions\": 3,$", MR_Next},
......
...@@ -71,6 +71,7 @@ void BM_Counters_Tabular(benchmark::State& state) { ...@@ -71,6 +71,7 @@ void BM_Counters_Tabular(benchmark::State& state) {
BENCHMARK(BM_Counters_Tabular)->ThreadRange(1, 16); BENCHMARK(BM_Counters_Tabular)->ThreadRange(1, 16);
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_Tabular/threads:%int\",$"}, {{"\"name\": \"BM_Counters_Tabular/threads:%int\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_Counters_Tabular/threads:%int\",$", MR_Next}, {"\"run_name\": \"BM_Counters_Tabular/threads:%int\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -123,6 +124,7 @@ void BM_CounterRates_Tabular(benchmark::State& state) { ...@@ -123,6 +124,7 @@ void BM_CounterRates_Tabular(benchmark::State& state) {
BENCHMARK(BM_CounterRates_Tabular)->ThreadRange(1, 16); BENCHMARK(BM_CounterRates_Tabular)->ThreadRange(1, 16);
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_CounterRates_Tabular/threads:%int\",$"}, {{"\"name\": \"BM_CounterRates_Tabular/threads:%int\",$"},
{"\"family_index\": 1,$", MR_Next},
{"\"run_name\": \"BM_CounterRates_Tabular/threads:%int\",$", {"\"run_name\": \"BM_CounterRates_Tabular/threads:%int\",$",
MR_Next}, MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
...@@ -174,6 +176,7 @@ void BM_CounterSet0_Tabular(benchmark::State& state) { ...@@ -174,6 +176,7 @@ void BM_CounterSet0_Tabular(benchmark::State& state) {
BENCHMARK(BM_CounterSet0_Tabular)->ThreadRange(1, 16); BENCHMARK(BM_CounterSet0_Tabular)->ThreadRange(1, 16);
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_CounterSet0_Tabular/threads:%int\",$"}, {{"\"name\": \"BM_CounterSet0_Tabular/threads:%int\",$"},
{"\"family_index\": 2,$", MR_Next},
{"\"run_name\": \"BM_CounterSet0_Tabular/threads:%int\",$", MR_Next}, {"\"run_name\": \"BM_CounterSet0_Tabular/threads:%int\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -212,6 +215,7 @@ void BM_CounterSet1_Tabular(benchmark::State& state) { ...@@ -212,6 +215,7 @@ void BM_CounterSet1_Tabular(benchmark::State& state) {
BENCHMARK(BM_CounterSet1_Tabular)->ThreadRange(1, 16); BENCHMARK(BM_CounterSet1_Tabular)->ThreadRange(1, 16);
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_CounterSet1_Tabular/threads:%int\",$"}, {{"\"name\": \"BM_CounterSet1_Tabular/threads:%int\",$"},
{"\"family_index\": 3,$", MR_Next},
{"\"run_name\": \"BM_CounterSet1_Tabular/threads:%int\",$", MR_Next}, {"\"run_name\": \"BM_CounterSet1_Tabular/threads:%int\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -254,6 +258,7 @@ void BM_CounterSet2_Tabular(benchmark::State& state) { ...@@ -254,6 +258,7 @@ void BM_CounterSet2_Tabular(benchmark::State& state) {
BENCHMARK(BM_CounterSet2_Tabular)->ThreadRange(1, 16); BENCHMARK(BM_CounterSet2_Tabular)->ThreadRange(1, 16);
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_CounterSet2_Tabular/threads:%int\",$"}, {{"\"name\": \"BM_CounterSet2_Tabular/threads:%int\",$"},
{"\"family_index\": 4,$", MR_Next},
{"\"run_name\": \"BM_CounterSet2_Tabular/threads:%int\",$", MR_Next}, {"\"run_name\": \"BM_CounterSet2_Tabular/threads:%int\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
......
...@@ -32,6 +32,7 @@ BENCHMARK(BM_Counters_Simple); ...@@ -32,6 +32,7 @@ BENCHMARK(BM_Counters_Simple);
ADD_CASES(TC_ConsoleOut, ADD_CASES(TC_ConsoleOut,
{{"^BM_Counters_Simple %console_report bar=%hrfloat foo=%hrfloat$"}}); {{"^BM_Counters_Simple %console_report bar=%hrfloat foo=%hrfloat$"}});
ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_Counters_Simple\",$"}, ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_Counters_Simple\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_Counters_Simple\",$", MR_Next}, {"\"run_name\": \"BM_Counters_Simple\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -78,6 +79,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_WithBytesAndItemsPSec %console_report " ...@@ -78,6 +79,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_WithBytesAndItemsPSec %console_report "
"foo=%hrfloat items_per_second=%hrfloat/s$"}}); "foo=%hrfloat items_per_second=%hrfloat/s$"}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_WithBytesAndItemsPSec\",$"}, {{"\"name\": \"BM_Counters_WithBytesAndItemsPSec\",$"},
{"\"family_index\": 1,$", MR_Next},
{"\"run_name\": \"BM_Counters_WithBytesAndItemsPSec\",$", MR_Next}, {"\"run_name\": \"BM_Counters_WithBytesAndItemsPSec\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -125,6 +127,7 @@ ADD_CASES( ...@@ -125,6 +127,7 @@ ADD_CASES(
TC_ConsoleOut, TC_ConsoleOut,
{{"^BM_Counters_Rate %console_report bar=%hrfloat/s foo=%hrfloat/s$"}}); {{"^BM_Counters_Rate %console_report bar=%hrfloat/s foo=%hrfloat/s$"}});
ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_Counters_Rate\",$"}, ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_Counters_Rate\",$"},
{"\"family_index\": 2,$", MR_Next},
{"\"run_name\": \"BM_Counters_Rate\",$", MR_Next}, {"\"run_name\": \"BM_Counters_Rate\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -165,6 +168,7 @@ BENCHMARK(BM_Invert); ...@@ -165,6 +168,7 @@ BENCHMARK(BM_Invert);
ADD_CASES(TC_ConsoleOut, ADD_CASES(TC_ConsoleOut,
{{"^BM_Invert %console_report bar=%hrfloatu foo=%hrfloatk$"}}); {{"^BM_Invert %console_report bar=%hrfloatu foo=%hrfloatk$"}});
ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_Invert\",$"}, ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_Invert\",$"},
{"\"family_index\": 3,$", MR_Next},
{"\"run_name\": \"BM_Invert\",$", MR_Next}, {"\"run_name\": \"BM_Invert\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -207,6 +211,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_InvertedRate %console_report " ...@@ -207,6 +211,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_InvertedRate %console_report "
"bar=%hrfloats foo=%hrfloats$"}}); "bar=%hrfloats foo=%hrfloats$"}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_InvertedRate\",$"}, {{"\"name\": \"BM_Counters_InvertedRate\",$"},
{"\"family_index\": 4,$", MR_Next},
{"\"run_name\": \"BM_Counters_InvertedRate\",$", MR_Next}, {"\"run_name\": \"BM_Counters_InvertedRate\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -246,6 +251,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_Threads/threads:%int %console_report " ...@@ -246,6 +251,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_Threads/threads:%int %console_report "
"bar=%hrfloat foo=%hrfloat$"}}); "bar=%hrfloat foo=%hrfloat$"}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_Threads/threads:%int\",$"}, {{"\"name\": \"BM_Counters_Threads/threads:%int\",$"},
{"\"family_index\": 5,$", MR_Next},
{"\"run_name\": \"BM_Counters_Threads/threads:%int\",$", MR_Next}, {"\"run_name\": \"BM_Counters_Threads/threads:%int\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -285,6 +291,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_AvgThreads/threads:%int " ...@@ -285,6 +291,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_AvgThreads/threads:%int "
"%console_report bar=%hrfloat foo=%hrfloat$"}}); "%console_report bar=%hrfloat foo=%hrfloat$"}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_AvgThreads/threads:%int\",$"}, {{"\"name\": \"BM_Counters_AvgThreads/threads:%int\",$"},
{"\"family_index\": 6,$", MR_Next},
{"\"run_name\": \"BM_Counters_AvgThreads/threads:%int\",$", MR_Next}, {"\"run_name\": \"BM_Counters_AvgThreads/threads:%int\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -327,6 +334,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_AvgThreadsRate/threads:%int " ...@@ -327,6 +334,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_AvgThreadsRate/threads:%int "
"%console_report bar=%hrfloat/s foo=%hrfloat/s$"}}); "%console_report bar=%hrfloat/s foo=%hrfloat/s$"}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_AvgThreadsRate/threads:%int\",$"}, {{"\"name\": \"BM_Counters_AvgThreadsRate/threads:%int\",$"},
{"\"family_index\": 7,$", MR_Next},
{"\"run_name\": \"BM_Counters_AvgThreadsRate/threads:%int\",$", {"\"run_name\": \"BM_Counters_AvgThreadsRate/threads:%int\",$",
MR_Next}, MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
...@@ -367,6 +375,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_IterationInvariant %console_report " ...@@ -367,6 +375,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_IterationInvariant %console_report "
"bar=%hrfloat foo=%hrfloat$"}}); "bar=%hrfloat foo=%hrfloat$"}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_IterationInvariant\",$"}, {{"\"name\": \"BM_Counters_IterationInvariant\",$"},
{"\"family_index\": 8,$", MR_Next},
{"\"run_name\": \"BM_Counters_IterationInvariant\",$", MR_Next}, {"\"run_name\": \"BM_Counters_IterationInvariant\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -412,6 +421,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_kIsIterationInvariantRate " ...@@ -412,6 +421,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_kIsIterationInvariantRate "
"%console_report bar=%hrfloat/s foo=%hrfloat/s$"}}); "%console_report bar=%hrfloat/s foo=%hrfloat/s$"}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_kIsIterationInvariantRate\",$"}, {{"\"name\": \"BM_Counters_kIsIterationInvariantRate\",$"},
{"\"family_index\": 9,$", MR_Next},
{"\"run_name\": \"BM_Counters_kIsIterationInvariantRate\",$", {"\"run_name\": \"BM_Counters_kIsIterationInvariantRate\",$",
MR_Next}, MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
...@@ -455,6 +465,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_AvgIterations %console_report " ...@@ -455,6 +465,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_AvgIterations %console_report "
"bar=%hrfloat foo=%hrfloat$"}}); "bar=%hrfloat foo=%hrfloat$"}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_AvgIterations\",$"}, {{"\"name\": \"BM_Counters_AvgIterations\",$"},
{"\"family_index\": 10,$", MR_Next},
{"\"run_name\": \"BM_Counters_AvgIterations\",$", MR_Next}, {"\"run_name\": \"BM_Counters_AvgIterations\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
...@@ -498,6 +509,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_kAvgIterationsRate " ...@@ -498,6 +509,7 @@ ADD_CASES(TC_ConsoleOut, {{"^BM_Counters_kAvgIterationsRate "
"%console_report bar=%hrfloat/s foo=%hrfloat/s$"}}); "%console_report bar=%hrfloat/s foo=%hrfloat/s$"}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_kAvgIterationsRate\",$"}, {{"\"name\": \"BM_Counters_kAvgIterationsRate\",$"},
{"\"family_index\": 11,$", MR_Next},
{"\"run_name\": \"BM_Counters_kAvgIterationsRate\",$", MR_Next}, {"\"run_name\": \"BM_Counters_kAvgIterationsRate\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 1,$", MR_Next}, {"\"repetitions\": 1,$", MR_Next},
......
...@@ -51,6 +51,7 @@ ADD_CASES( ...@@ -51,6 +51,7 @@ ADD_CASES(
}); });
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_Thousands/repeats:2\",$"}, {{"\"name\": \"BM_Counters_Thousands/repeats:2\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_Counters_Thousands/repeats:2\",$", MR_Next}, {"\"run_name\": \"BM_Counters_Thousands/repeats:2\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 2,$", MR_Next}, {"\"repetitions\": 2,$", MR_Next},
...@@ -68,6 +69,7 @@ ADD_CASES(TC_JSONOut, ...@@ -68,6 +69,7 @@ ADD_CASES(TC_JSONOut,
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_Thousands/repeats:2\",$"}, {{"\"name\": \"BM_Counters_Thousands/repeats:2\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_Counters_Thousands/repeats:2\",$", MR_Next}, {"\"run_name\": \"BM_Counters_Thousands/repeats:2\",$", MR_Next},
{"\"run_type\": \"iteration\",$", MR_Next}, {"\"run_type\": \"iteration\",$", MR_Next},
{"\"repetitions\": 2,$", MR_Next}, {"\"repetitions\": 2,$", MR_Next},
...@@ -85,6 +87,7 @@ ADD_CASES(TC_JSONOut, ...@@ -85,6 +87,7 @@ ADD_CASES(TC_JSONOut,
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_Thousands/repeats:2_mean\",$"}, {{"\"name\": \"BM_Counters_Thousands/repeats:2_mean\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_Counters_Thousands/repeats:2\",$", MR_Next}, {"\"run_name\": \"BM_Counters_Thousands/repeats:2\",$", MR_Next},
{"\"run_type\": \"aggregate\",$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"\"repetitions\": 2,$", MR_Next}, {"\"repetitions\": 2,$", MR_Next},
...@@ -102,6 +105,7 @@ ADD_CASES(TC_JSONOut, ...@@ -102,6 +105,7 @@ ADD_CASES(TC_JSONOut,
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_Thousands/repeats:2_median\",$"}, {{"\"name\": \"BM_Counters_Thousands/repeats:2_median\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_Counters_Thousands/repeats:2\",$", MR_Next}, {"\"run_name\": \"BM_Counters_Thousands/repeats:2\",$", MR_Next},
{"\"run_type\": \"aggregate\",$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"\"repetitions\": 2,$", MR_Next}, {"\"repetitions\": 2,$", MR_Next},
...@@ -119,6 +123,7 @@ ADD_CASES(TC_JSONOut, ...@@ -119,6 +123,7 @@ ADD_CASES(TC_JSONOut,
{"}", MR_Next}}); {"}", MR_Next}});
ADD_CASES(TC_JSONOut, ADD_CASES(TC_JSONOut,
{{"\"name\": \"BM_Counters_Thousands/repeats:2_stddev\",$"}, {{"\"name\": \"BM_Counters_Thousands/repeats:2_stddev\",$"},
{"\"family_index\": 0,$", MR_Next},
{"\"run_name\": \"BM_Counters_Thousands/repeats:2\",$", MR_Next}, {"\"run_name\": \"BM_Counters_Thousands/repeats:2\",$", MR_Next},
{"\"run_type\": \"aggregate\",$", MR_Next}, {"\"run_type\": \"aggregate\",$", MR_Next},
{"\"repetitions\": 2,$", MR_Next}, {"\"repetitions\": 2,$", MR_Next},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment