Bloom filter for probabilistic membership testing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

bloom: Update ocamlformat to 0.28.1, monitor: Add clock to env

+20 -14
+1 -4
.ocamlformat
··· 1 - version = 0.19.0 2 - parse-docstrings = true 3 - break-infix = fit-or-vertical 4 - module-item-spacing = compact 1 + version = 0.28.1
+2
fuzz/dune
··· 4 4 (libraries bloom crowbar)) 5 5 6 6 ; Quick check with Crowbar (no AFL instrumentation) 7 + 7 8 (rule 8 9 (alias fuzz) 9 10 (deps fuzz.exe) ··· 11 12 (run %{exe:fuzz.exe}))) 12 13 13 14 ; AFL-instrumented build target (use with --profile=afl) 15 + 14 16 (rule 15 17 (alias fuzz-afl) 16 18 (deps
+17 -10
fuzz/fuzz_bloom.ml
··· 88 88 let _ = Bloom.create ~error_rate:(-0.1) 100 in 89 89 fail "should reject negative error_rate" 90 90 with Invalid_argument _ -> ()); 91 - (try 92 - let _ = Bloom.create ~error_rate:1.5 100 in 93 - fail "should reject error_rate>1" 94 - with Invalid_argument _ -> ()) 91 + try 92 + let _ = Bloom.create ~error_rate:1.5 100 in 93 + fail "should reject error_rate>1" 94 + with Invalid_argument _ -> () 95 95 96 96 let run () = 97 - add_test ~name:"bloom: no false negatives" [ bytes; list bytes ] 97 + add_test ~name:"bloom: no false negatives" 98 + [ bytes; list bytes ] 98 99 test_no_false_negatives; 99 - add_test ~name:"bloom: serialization roundtrip" [ list bytes ] 100 + add_test ~name:"bloom: serialization roundtrip" 101 + [ list bytes ] 100 102 test_serialization_roundtrip; 101 - add_test ~name:"bloom: union contains both" [ list bytes; list bytes ] 103 + add_test ~name:"bloom: union contains both" 104 + [ list bytes; list bytes ] 102 105 test_union; 103 - add_test ~name:"bloom: copy independence" [ list bytes; bytes ] 106 + add_test ~name:"bloom: copy independence" 107 + [ list bytes; bytes ] 104 108 test_copy_independence; 105 109 add_test ~name:"bloom: clear empties filter" [ list bytes ] test_clear; 106 - add_test ~name:"bloom: intersection preserves common" [ list bytes ] 110 + add_test ~name:"bloom: intersection preserves common" 111 + [ list bytes ] 107 112 test_intersection; 108 - add_test ~name:"bloom: invalid error_rate" [ const () ] test_invalid_error_rate 113 + add_test ~name:"bloom: invalid error_rate" 114 + [ const () ] 115 + test_invalid_error_rate