aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-05-22 14:48:51 +0100
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-05-22 15:55:50 +0100
commitd2dbc7da26e1ca40200521c05a0b1ca75578acd2 (patch)
treee5a73a763c0149ba30f55cc8e47b0a3b8f7c42b6 /src
parent3001cc61cf11e016c403ce83c9cbcfd3efcbcfd9 (diff)
bench: Add benchmark for CRollingBloomFilter::reset
Diffstat (limited to 'src')
-rw-r--r--src/bench/rollingbloom.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bench/rollingbloom.cpp b/src/bench/rollingbloom.cpp
index 0a99ea3184..4016530dac 100644
--- a/src/bench/rollingbloom.cpp
+++ b/src/bench/rollingbloom.cpp
@@ -28,4 +28,13 @@ static void RollingBloom(benchmark::State& state)
}
}
+static void RollingBloomReset(benchmark::State& state)
+{
+ CRollingBloomFilter filter(120000, 0.000001);
+ while (state.KeepRunning()) {
+ filter.reset();
+ }
+}
+
BENCHMARK(RollingBloom, 1500 * 1000);
+BENCHMARK(RollingBloomReset, 20000);