MCPcopy Create free account
hub / github.com/apple/foundationdb / bench_hash

Function bench_hash

flowbench/BenchHash.cpp:58–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57template <HashType hashType>
58static void bench_hash(benchmark::State& state) {
59 auto length = 1 << state.range(0);
60 auto key = getKey(length);
61 while (state.KeepRunning()) {
62 hash<hashType>(key, length);
63 }
64 state.SetItemsProcessed(static_cast<long>(state.iterations()));
65}
66
67BENCHMARK_TEMPLATE(bench_hash, HashType::CRC32C)->DenseRange(2, 18)->ReportAggregatesOnly(true);
68BENCHMARK_TEMPLATE(bench_hash, HashType::HashLittle2)->DenseRange(2, 18)->ReportAggregatesOnly(true);

Callers

nothing calls this directly

Calls 2

getKeyFunction · 0.70
rangeMethod · 0.45

Tested by

no test coverage detected