diff --git a/root/io/io/TFile_RDFSnapshot.cxx b/root/io/io/TFile_RDFSnapshot.cxx index f15544d3b..f646c71be 100644 --- a/root/io/io/TFile_RDFSnapshot.cxx +++ b/root/io/io/TFile_RDFSnapshot.cxx @@ -28,7 +28,7 @@ static void BM_TFile_RDFSnapshot_ZLIB(benchmark::State &state) { auto options = SetupRDFOptions(ROOT::RCompressionSetting::EAlgorithm::kZLIB, 1); for (auto _ : state) { //And we write out the dataset on disk - tdf.Snapshot("randomNumbers", "bench_data.root", {"rnd"}, options); + tdf.Snapshot("randomNumbers", "bench_data.root", {"rnd"}, options); } } BENCHMARK(BM_TFile_RDFSnapshot_ZLIB)->Unit(benchmark::kMicrosecond); @@ -39,7 +39,7 @@ static void BM_TFile_RDFSnapshot_LZ4(benchmark::State &state) { auto options = SetupRDFOptions(ROOT::RCompressionSetting::EAlgorithm::kLZ4, 4); for (auto _ : state) { //And we write out the dataset on disk - tdf.Snapshot("randomNumbers", "bench_data.root", {"rnd"}, options); + tdf.Snapshot("randomNumbers", "bench_data.root", {"rnd"}, options); } } BENCHMARK(BM_TFile_RDFSnapshot_LZ4)->Unit(benchmark::kMicrosecond); @@ -50,7 +50,7 @@ static void BM_TFile_RDFSnapshot_LZMA (benchmark::State &state) { auto options = SetupRDFOptions(ROOT::RCompressionSetting::EAlgorithm::kLZMA, 8); for (auto _ : state) { //And we write out the dataset on disk - tdf.Snapshot("randomNumbers", "bench_data.root", {"rnd"}, options); + tdf.Snapshot("randomNumbers", "bench_data.root", {"rnd"}, options); } } BENCHMARK(BM_TFile_RDFSnapshot_LZMA)->Unit(benchmark::kMicrosecond); @@ -60,7 +60,7 @@ static void BM_TFile_RDFSnapshot_ZSTD (benchmark::State &state) { auto options = SetupRDFOptions(ROOT::RCompressionSetting::EAlgorithm::kZSTD, 6); for (auto _ : state) { //And we write out the dataset on disk - tdf.Snapshot("randomNumbers", "bench_data.root", {"rnd"}, options); + tdf.Snapshot("randomNumbers", "bench_data.root", {"rnd"}, options); } } BENCHMARK(BM_TFile_RDFSnapshot_ZSTD)->Unit(benchmark::kMicrosecond); diff --git a/root/roofit/roofit/BenchmarkUtils.h b/root/roofit/roofit/BenchmarkUtils.h index 9b9a43b2b..9458d86eb 100644 --- a/root/roofit/roofit/BenchmarkUtils.h +++ b/root/roofit/roofit/BenchmarkUtils.h @@ -15,7 +15,13 @@ template void doBenchmarks(const char *name, int backend, F func, std::vector const &range, int numIterations = 1, benchmark::TimeUnit unit = benchmark::kMillisecond) { - benchmark::RegisterBenchmark(name, func)->ArgsProduct({{backend}, range})->Unit(unit)->Iterations(numIterations); + std::vector> arglists; + arglists.emplace_back(std::vector{backend}); + arglists.emplace_back(); + for (auto val : range) { + arglists.back().emplace_back(val); + } + benchmark::RegisterBenchmark(name, func)->ArgsProduct(arglists)->Unit(unit)->Iterations(numIterations); } void randomizeParameters(const RooArgSet ¶meters) diff --git a/root/tree/dataframe/RDataFrameBenchmarks.cxx b/root/tree/dataframe/RDataFrameBenchmarks.cxx index eef574ea3..d5b8a82c6 100644 --- a/root/tree/dataframe/RDataFrameBenchmarks.cxx +++ b/root/tree/dataframe/RDataFrameBenchmarks.cxx @@ -20,7 +20,7 @@ static void BM_RDataFrame_CreateFromFile(benchmark::State &state) { const auto fname = RB::GetTempFs() + "/tdf_createfromfile.root"; const auto treeName = "t"; - RDataFrame(0).Snapshot<>(treeName, fname, {}); + RDataFrame(0).Snapshot(treeName, fname, {}); for (auto _ : state) RDataFrame(treeName, fname); @@ -84,7 +84,7 @@ static void BM_RDataFrame_NoOpLoopOnFile(benchmark::State &state) { const auto fname = RB::GetTempFs() + "/tdf_nooplooponfile" + std::to_string(state.range(0)) + ".root"; const auto treeName = "t"; - RDataFrame(state.range(0)).Snapshot<>(treeName, fname, {}); + RDataFrame(state.range(0)).Snapshot(treeName, fname, {}); for (auto _ : state) RDataFrame(treeName, fname).Foreach([] {}); diff --git a/root/tree/dataframe/RDataFrameSumBenchmarks.cxx b/root/tree/dataframe/RDataFrameSumBenchmarks.cxx index 7029e8f42..bb0130ff4 100644 --- a/root/tree/dataframe/RDataFrameSumBenchmarks.cxx +++ b/root/tree/dataframe/RDataFrameSumBenchmarks.cxx @@ -32,7 +32,7 @@ void MakeDataIfNeeded() ROOT::RDataFrame(nEntries) .Define(scalarBranch, [] { return 42; }) .Define(vectorBranch, [] { return std::vector{1, 2, 3, 4, 5, 6, 7, 8}; }) - .Snapshot>(treeName, pathToFile.c_str(), {scalarBranch, vectorBranch}); + .Snapshot(treeName, pathToFile.c_str(), {scalarBranch, vectorBranch}); } static void BM_RDataFrameSum_CreateEmptyDF(benchmark::State &state) diff --git a/root/tree/tree/TTreeSumBenchmarks.cxx b/root/tree/tree/TTreeSumBenchmarks.cxx index 9440c9b2f..b717541dd 100644 --- a/root/tree/tree/TTreeSumBenchmarks.cxx +++ b/root/tree/tree/TTreeSumBenchmarks.cxx @@ -32,7 +32,7 @@ void MakeDataIfNeeded() ROOT::RDataFrame(nEntries) .Define(scalarBranch, [] { return 42; }) .Define(vectorBranch, [] { return std::vector{1, 2, 3, 4, 5, 6, 7, 8}; }) - .Snapshot>(treeName, pathToFile.c_str(), {scalarBranch, vectorBranch}); + .Snapshot(treeName, pathToFile.c_str(), {scalarBranch, vectorBranch}); } static void BM_TTreeSum_SumScalarTBranchGetEntry(benchmark::State &state)