aboutsummaryrefslogtreecommitdiff
path: root/src/test/bench.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-04-11 12:50:50 -0400
committerNick Mathewson <nickm@torproject.org>2013-01-16 16:57:11 -0500
commit49e619c1cf7ed62334263a89eb031899bc2e7178 (patch)
treeb16cd982baa62c80db14d3671c7c1a355794239a /src/test/bench.c
parente4821fa14de6d76219d4e5c1a320ba263bd5e46d (diff)
downloadtor-49e619c1cf7ed62334263a89eb031899bc2e7178.tar.gz
tor-49e619c1cf7ed62334263a89eb031899bc2e7178.zip
Rename *_isin to *_contains
This is an automatically generated commit, from the following perl script, run with the options "-w -i -p". s/smartlist_string_num_isin/smartlist_contains_int_as_string/g; s/smartlist_string_isin((?:_case)?)/smartlist_contains_string$1/g; s/smartlist_digest_isin/smartlist_contains_digest/g; s/smartlist_isin/smartlist_contains/g; s/digestset_isin/digestset_contains/g;
Diffstat (limited to 'src/test/bench.c')
-rw-r--r--src/test/bench.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/bench.c b/src/test/bench.c
index 3cad61e620..d57aeb81aa 100644
--- a/src/test/bench.c
+++ b/src/test/bench.c
@@ -309,18 +309,18 @@ bench_dmap(void)
NANOCOUNT(pt3, pt4, iters*elts));
for (i = 0; i < iters; ++i) {
- SMARTLIST_FOREACH(sl, const char *, cp, n += digestset_isin(ds, cp));
- SMARTLIST_FOREACH(sl2, const char *, cp, n += digestset_isin(ds, cp));
+ SMARTLIST_FOREACH(sl, const char *, cp, n += digestset_contains(ds, cp));
+ SMARTLIST_FOREACH(sl2, const char *, cp, n += digestset_contains(ds, cp));
}
end = perftime();
- printf("digestset_isin: %.2f ns per element.\n",
+ printf("digestset_contains: %.2f ns per element.\n",
NANOCOUNT(pt4, end, iters*elts*2));
/* We need to use this, or else the whole loop gets optimized out. */
printf("Hits == %d\n", n);
for (i = 0; i < fpostests; ++i) {
crypto_rand(d, 20);
- if (digestset_isin(ds, d)) ++fp;
+ if (digestset_contains(ds, d)) ++fp;
}
printf("False positive rate on digestset: %.2f%%\n",
(fp/(double)fpostests)*100);