We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c96e7c commit f1bef4bCopy full SHA for f1bef4b
2 files changed
example_test.go
@@ -11,7 +11,7 @@ func Example() {
11
// at a false-positives rate less than 0.5 percent.
12
blacklist := bloom.New(10000, 200)
13
14
- // Add a string to the filter.
+ // Add an element to the filter.
15
url := "https://rascal.com"
16
blacklist.Add(url)
17
filter_test.go
@@ -57,3 +57,10 @@ func TestFilter(t *testing.T) {
57
}
58
59
60
+
61
+func BenchmarkAdd(b *testing.B) {
62
+ filter := New(10000, 200)
63
+ for i := 0; i < b.N; i++ {
64
+ filter.Add("The quick brown fox jumps over the lazy dog.")
65
+ }
66
+}
0 commit comments