.buildBloomFilter();
}
public static void testPerformance() throws UnknownHostException, IOException {
//Test the performance of the in-memory Bloom filter
BloomFilter<String> bf = new FilterBuilder(100_000, 0.01).hashFunction(HashMethod.Murmur3).buildBloomFilter();
MemoryBFTest.benchmark(bf, "Normal Bloom Filter", 1_000_000);
//And the Redis-backed BF
String IP = "192.168.44.132";
String filterName = "normalbloomfilter";
//Open a Redis-backed Bloom filter
CountingBloomFilter<String> cbfr = new FilterBuilder(10000, 0.01).redisBacked(true).buildCountingBloomFilter();
MemoryBFTest.benchmark(cbfr, "Redis Test", 10_000);
cbfr.remove();
List<BloomFilter<String>> bfs = new ArrayList<>();
CountingBloomFilter<String> first = new FilterBuilder(1000, 0.01)
.redisBacked(true)
.buildCountingBloomFilter();
bfs.add(first);
for (int i = 1; i < 10; i++) {
bfs.add(first.clone());