mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
![]() When constructing a Bloom filter, one now has to pass a HashPolicy instance to it. This separates more clearly the concerns of hashing and Bloom filter management. This commit also changes the interface to initialize Bloom filters: there exist now two initialization functions, one for each type: (1) bloomfilter_basic_init(fp: double, capacity: count, name: string &default=""): opaque of bloomfilter (2) bloomfilter_counting_init(k: count, cells: count, max: count, name: string &default=""): opaque of bloomfilter The BiFs for adding elements and performing lookups remain the same. This essentially gives us "BiF polymorphism" at script land, where the initialization BiF constructs the most derived type while subsequent BiFs adhere to the same interface. The reason why we split up the constructor in this case is that we have not yet derived the math that computes the optimal number of hash functions for counting Bloom filters---users have to explicitly parameterize them for now. |
||
---|---|---|
.. | ||
btest | ||
external | ||
scripts | ||
.gitignore | ||
Makefile | ||
README |
This directory contains suites for testing for Bro's correct operation: btest/ An ever-growing set of small unit tests testing Bro's functionality. external/ A framework for downloading additional test sets that run more complex Bro configuration on larger traces files. Due to their size, these are not included directly. See the README for more information. scripts/ Helpers scripts used by some tests.