Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0f708ab2
Commit
0f708ab2
authored
Sep 07, 2016
by
antirez
Browse files
dict.c benchmark: finish rehashing before testing lookups.
parent
ed6a4517
Changes
1
Show whitespace changes
Inline
Side-by-side
src/dict.c
View file @
0f708ab2
...
@@ -1150,6 +1150,11 @@ int main(int argc, char **argv) {
...
@@ -1150,6 +1150,11 @@ int main(int argc, char **argv) {
end_benchmark
(
"Inserting"
);
end_benchmark
(
"Inserting"
);
assert
((
long
)
dictSize
(
dict
)
==
count
);
assert
((
long
)
dictSize
(
dict
)
==
count
);
/* Wait for rehashing. */
while
(
dictIsRehashing
(
dict
))
{
dictRehashMilliseconds
(
dict
,
100
);
}
start_benchmark
();
start_benchmark
();
for
(
j
=
0
;
j
<
count
;
j
++
)
{
for
(
j
=
0
;
j
<
count
;
j
++
)
{
sds
key
=
sdsfromlonglong
(
rand
()
%
count
);
sds
key
=
sdsfromlonglong
(
rand
()
%
count
);
...
...
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