Skip to content

Commit ab1a6c6

Browse files
committed
Add ClobberMemory to count_min update benchmarks
1 parent 837fe9d commit ab1a6c6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

benchmarks/benchmark_count_min_sketch.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ void BM_CountMinUpdateUInt64(benchmark::State & state)
7373
for (const auto key : keys)
7474
sketch.update(&key, sizeof(key), 1);
7575

76+
benchmark::ClobberMemory();
7677
benchmark::DoNotOptimize(sketch.get_total_weight());
7778
}
7879

@@ -94,6 +95,7 @@ void BM_CountMinUpdateStringBytes(benchmark::State & state)
9495
for (const auto & key : keys)
9596
sketch.update(key.data(), key.size(), 1);
9697

98+
benchmark::ClobberMemory();
9799
benchmark::DoNotOptimize(sketch.get_total_weight());
98100
}
99101

0 commit comments

Comments
 (0)