sapling/eden/fs/utils/test/IDGenBenchmark.cpp
Chad Austin 407c817d7a switch from folly benchmark to google benchmark
Summary:
Google Benchmark is easier to use, has more built-in functionality,
and more accurate default behavior than Folly Benchmark, so switch
EdenFS to use it.;

Reviewed By: simpkins

Differential Revision: D20273672

fbshipit-source-id: c90c49878592620a83d2821ed4bc75c20e599a75
2020-04-30 09:36:01 -07:00

20 lines
452 B
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#include "eden/fs/utils/IDGen.h"
#include <benchmark/benchmark.h>
using namespace facebook::eden;
static void BM_generateUniqueID(benchmark::State& state) {
for (auto _ : state) {
benchmark::DoNotOptimize(generateUniqueID());
}
}
BENCHMARK(BM_generateUniqueID);