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
feecb608
Commit
feecb608
authored
Nov 05, 2010
by
Pieter Noordhuis
Browse files
Use multi-bulk protocol in SET benchmark
parent
8146e316
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
feecb608
...
...
@@ -467,12 +467,13 @@ int main(int argc, char **argv) {
prepareForBenchmark
(
"SET"
);
c
=
createClient
(
REDIS_REPLY_STATUS
);
c
->
obuf
=
sdscat
(
c
->
obuf
,
"
SET
foo_rand000000000000
"
);
c
->
obuf
=
sdscat
(
c
->
obuf
,
"
*3
\r\n
$3
\r\n
SET
\r\n
$20
\r\n
foo_rand000000000000
\r\n
"
);
{
char
*
data
=
zmalloc
(
config
.
datasize
+
2
);
memset
(
data
,
'x'
,
config
.
datasize
);
data
[
config
.
datasize
]
=
'\r'
;
data
[
config
.
datasize
+
1
]
=
'\n'
;
c
->
obuf
=
sdscatprintf
(
c
->
obuf
,
"$%d
\r\n
"
,
config
.
datasize
);
c
->
obuf
=
sdscatlen
(
c
->
obuf
,
data
,
config
.
datasize
+
2
);
}
createMissingClients
(
c
);
...
...
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