File tree Expand file tree Collapse file tree 5 files changed +17
-23
lines changed Expand file tree Collapse file tree 5 files changed +17
-23
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- #include " RDataFrameBench.h"
21#include " ROOT/RDataFrame.hxx"
32#include " TROOT.h" // ROOT::EnableImplicitMT
43#include " TSystem.h" // TSystem::Unlink
109
1110using namespace ROOT ;
1211
13- const std::string scratchDir = RB::GetTempFs();
14-
1512static void BM_RDataFrame_CreateEmpty (benchmark::State &state)
1613{
1714 for (auto _ : state)
@@ -21,7 +18,7 @@ BENCHMARK(BM_RDataFrame_CreateEmpty)->Unit(benchmark::kMicrosecond);
2118
2219static void BM_RDataFrame_CreateFromFile (benchmark::State &state)
2320{
24- const auto fname = scratchDir + " /tdf_createfromfile.root" ;
21+ const auto fname = RB::GetTempFs () + " /tdf_createfromfile.root" ;
2522 const auto treeName = " t" ;
2623 RDataFrame (0 ).Snapshot <>(treeName, fname, {});
2724
@@ -79,7 +76,7 @@ BENCHMARK(BM_RDataFrame_NoOpLoop)->Unit(benchmark::kMicrosecond)->Arg(0)->Arg(1)
7976
8077static void BM_RDataFrame_NoOpLoopOnFile (benchmark::State &state)
8178{
82- const auto fname = scratchDir + " /tdf_nooplooponfile" + std::to_string (state.range (0 )) + " .root" ;
79+ const auto fname = RB::GetTempFs () + " /tdf_nooplooponfile" + std::to_string (state.range (0 )) + " .root" ;
8380 const auto treeName = " t" ;
8481 RDataFrame (state.range (0 )).Snapshot <>(treeName, fname, {});
8582
Original file line number Diff line number Diff line change 1- #include " RDataFrameBench.h"
21#include < ROOT/RDataFrame.hxx>
32#include < ROOT/RVec.hxx>
43#include < TFile.h>
1413#include < vector>
1514#include < cstring>
1615
16+ #include " rootbench/RBConfig.h"
17+
1718using ROOT::RVec;
1819
1920static constexpr auto treeName = " Events" ;
2021static constexpr auto fileName = " data.root" ;
2122static constexpr auto scalarBranch = " x" ;
2223static constexpr auto vectorBranch = " vec" ;
2324static constexpr auto nEntries = 100000 ;
24- static const auto pathToFile = scratchDir + " /" + fileName;
25+ static const auto pathToFile = RB::GetTempFs() + " /" + fileName;
2526
2627
27- void ensure (bool b)
28+ inline void ensure (bool b)
2829{
2930 if (!b)
3031 std::abort ();
Original file line number Diff line number Diff line change 1- #include " RDataFrameBench.h"
21#include < TFile.h>
32#include < TSystem.h>
43#include < TTree.h>
87#include < vector>
98#include " rootbench/RBConfig.h"
109
11- const std::string scratchDir = RB::GetTempFs();
12-
1310static constexpr auto treeName = " Events" ;
1411static constexpr auto fileNameOneBranch = " dataonebranch.root" ;
1512static constexpr auto fileNameTwoBranches = " datatwobranches.root" ;
1613static constexpr auto branchOne = " x" ;
1714static constexpr auto branchTwo = " y" ;
1815static constexpr auto nEntries = 8000 ;
19- static auto pathOneBranch = scratchDir + " /" + fileNameOneBranch;
20- static auto pathTwoBranches = scratchDir + " /" + fileNameTwoBranches;
21-
22-
16+ static auto pathOneBranch = RB::GetTempFs() + " /" + fileNameOneBranch;
17+ static auto pathTwoBranches = RB::GetTempFs() + " /" + fileNameTwoBranches;
2318
2419// an assert implementation that is not no-op for optimized builds
25- void ensure (bool b)
20+ inline void ensure (bool b)
2621{
2722 if (!b)
2823 std::abort ();
Original file line number Diff line number Diff line change 1- #include " RDataFrameBench.h"
21#include < ROOT/RDataFrame.hxx>
32#include < ROOT/RVec.hxx>
43#include < TFile.h>
1413#include < vector>
1514#include < cstring>
1615
16+ #include " rootbench/RBConfig.h"
17+
18+ inline void ensure (bool b)
19+ {
20+ if (!b)
21+ std::abort ();
22+ }
1723
1824using ROOT::RVec;
1925
@@ -22,7 +28,7 @@ static constexpr auto fileName = "data.root";
2228static constexpr auto scalarBranch = " x" ;
2329static constexpr auto vectorBranch = " vec" ;
2430static constexpr auto nEntries = 100000 ;
25- static const auto pathToFile = scratchDir + " /" + fileName;
31+ static const auto pathToFile = RB::GetTempFs() + " /" + fileName;
2632
2733
2834void MakeDataIfNeeded ()
You can’t perform that action at this time.
0 commit comments