Skip to content

Commit d2dbc7d

Browse files
committed
bench: Add benchmark for CRollingBloomFilter::reset
1 parent 3001cc6 commit d2dbc7d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/bench/rollingbloom.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,13 @@ static void RollingBloom(benchmark::State& state)
2828
}
2929
}
3030

31+
static void RollingBloomReset(benchmark::State& state)
32+
{
33+
CRollingBloomFilter filter(120000, 0.000001);
34+
while (state.KeepRunning()) {
35+
filter.reset();
36+
}
37+
}
38+
3139
BENCHMARK(RollingBloom, 1500 * 1000);
40+
BENCHMARK(RollingBloomReset, 20000);

0 commit comments

Comments
 (0)