Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-selector
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-selector
Commits
9c4a4cde
Commit
9c4a4cde
authored
Jun 03, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The benchmark for PH prints expected collisions and collision rate.
parent
ff16f72c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
bench_ph.c
src/tests/bench/bench_ph.c
+4
-0
No files found.
src/tests/bench/bench_ph.c
View file @
9c4a4cde
...
...
@@ -322,6 +322,10 @@ main(int argc, char *argv[])
printf
(
"Stats computed in %lu ns
\n
"
,
tdiff
(
&
before
,
&
after
));
printf
(
"%lu buckets
\n
"
,
stats
.
buckets
);
printf
(
"%lu collisions
\n
"
,
stats
.
collisions
);
printf
(
"%lu expected collisions
\n
"
,
((
uint64_t
)
n
*
(
uint64_t
)(
n
-
1
))
/
(
stats
.
buckets
*
2
));
printf
(
"%.3f collision rate
\n
"
,
(
double
)
stats
.
collisions
/
(
double
)
stats
.
buckets
);
printf
(
"%lu key vector length
\n
"
,
stats
.
klen
);
printf
(
"%lu min string length
\n
"
,
stats
.
minlen
);
printf
(
"%lu max string length
\n
"
,
stats
.
maxlen
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment