From d5c34fa8f4c2203930b1b641859183f43d1518ee Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Wed, 30 Mar 2022 10:09:49 -0700 Subject: [PATCH] Upgrade gbenchmark to 1.6.1 (#9775) Summary: Upgrade google benchmark to the latest 1.6.1. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9775 Test Plan: CI Reviewed By: riversand963 Differential Revision: D35252889 Pulled By: jay-zhuang fbshipit-source-id: 4d60dd1c6f522d0af0b3942ae8fa88e5ae17f34a --- .circleci/config.yml | 10 ++++++++-- build_tools/build_detect_platform | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eed5a42c3..3232c9530 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -102,10 +102,16 @@ commands: install-benchmark: steps: + - run: + name: Install ninja build + command: sudo apt-get update -y && sudo apt-get install -y ninja-build - run: name: Install benchmark command: | - sudo apt-get update -y && sudo apt-get install -y libbenchmark-dev + git clone --depth 1 --branch v1.6.1 https://github.com/google/benchmark.git ~/benchmark + cd ~/benchmark && mkdir build && cd build + cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_GTEST_TESTS=0 + ninja && sudo ninja install upgrade-cmake: steps: @@ -431,8 +437,8 @@ jobs: resource_class: xlarge steps: - pre-steps - - install-benchmark - run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get update -y && sudo apt-get install gcc-11 g++-11 libgflags-dev + - install-benchmark - run: CC=gcc-11 CXX=g++-11 V=1 make -j16 all microbench - post-steps diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform index 4dc9dd31b..3b5c817ea 100755 --- a/build_tools/build_detect_platform +++ b/build_tools/build_detect_platform @@ -598,7 +598,7 @@ EOF fi if ! test $ROCKSDB_DISABLE_BENCHMARK; then # Test whether google benchmark is available - $CXX $PLATFORM_CXXFLAGS -x c++ - -o /dev/null -lbenchmark 2>/dev/null </dev/null < int main() {} EOF