Skip to content

Commit f1107d9

Browse files
committed
revert change in root/io/io/TBufferMergerBenchmarks.cxx for correct usage of state.thread_index
1 parent 9bcceb1 commit f1107d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

root/io/io/TBufferMergerBenchmarks.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ TBufferMerger *Merger = nullptr;
3232
static void BM_TBufferFile_GetFile(benchmark::State &state)
3333
{
3434
ROOT::EnableThreadSafety();
35-
if (state.thread_index == 0) {
35+
if (state.thread_index() == 0) {
3636
// Setup code here.
3737
// FIXME: We should have a way to pass an externally constructed file or stream to
3838
// TFile*, this would allow us to create in-memory files and avoid killing disks
@@ -43,7 +43,7 @@ static void BM_TBufferFile_GetFile(benchmark::State &state)
4343
// Run the test as normal.
4444
auto myFile = Merger->GetFile();
4545
}
46-
if (state.thread_index == 0) {
46+
if (state.thread_index() == 0) {
4747
// Teardown code here.
4848
delete Merger;
4949
}
@@ -87,7 +87,7 @@ inline void FillTreeWithRandomData(TBufferMerger &merger, size_t nEntriesPerWork
8787
static void BM_TBufferFile_FillTreeWithRandomData(benchmark::State &state)
8888
{
8989
ROOT::EnableThreadSafety();
90-
if (state.thread_index == 0) {
90+
if (state.thread_index() == 0) {
9191
// Setup code here.
9292
Merger = new TBufferMerger(std::unique_ptr<TMemFile>(new TMemFile("virtual_file.root", "RECREATE")));
9393
}
@@ -100,7 +100,7 @@ static void BM_TBufferFile_FillTreeWithRandomData(benchmark::State &state)
100100
std::stringstream ss;
101101
ss << size;
102102
state.SetLabel(ss.str());
103-
if (state.thread_index == 0) {
103+
if (state.thread_index() == 0) {
104104
// Teardown code here.
105105
delete Merger;
106106
}

0 commit comments

Comments
 (0)