Skip to content

Commit a585eb8

Browse files
committed
Update google benchmark version / adopt benchmarks to changes
1 parent 07693f9 commit a585eb8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cmake/modules/GoogleBenchmark.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set(GBENCHMARK_LIBRARY_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}benchmark${CMAKE_STATI
99
ExternalProject_Add(
1010
googlebenchmark
1111
GIT_REPOSITORY https://github.com/google/benchmark.git
12-
GIT_TAG v1.5.5
12+
GIT_TAG v1.6.0
1313
UPDATE_COMMAND ""
1414
# TIMEOUT 10
1515
# # Force separate output paths for debug and release builds to allow easy
@@ -44,4 +44,4 @@ set(_GBENCH_LIBRARY_PATH ${binary_dir}/)
4444
# Register googlebenchmark
4545
add_library(gbenchmark IMPORTED STATIC GLOBAL)
4646
set_property(TARGET gbenchmark PROPERTY IMPORTED_LOCATION ${_GBENCH_LIBRARY_PATH}/src/libbenchmark.a)
47-
add_dependencies(gbenchmark googlebenchmark)
47+
add_dependencies(gbenchmark googlebenchmark)

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)