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
1ccfd6a1
Unverified
Commit
1ccfd6a1
authored
Mar 09, 2021
by
luhuachao
Committed by
GitHub
Mar 09, 2021
Browse files
Clean redis-benchmark multi-threaded output (#8615)
parent
25f8d4fb
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-benchmark.c
View file @
1ccfd6a1
...
@@ -1655,7 +1655,10 @@ int showThroughput(struct aeEventLoop *eventLoop, long long id, void *clientData
...
@@ -1655,7 +1655,10 @@ int showThroughput(struct aeEventLoop *eventLoop, long long id, void *clientData
const
float
instantaneous_rps
=
(
float
)(
requests_finished
-
previous_requests_finished
)
/
instantaneous_dt
;
const
float
instantaneous_rps
=
(
float
)(
requests_finished
-
previous_requests_finished
)
/
instantaneous_dt
;
config
.
previous_tick
=
current_tick
;
config
.
previous_tick
=
current_tick
;
atomicSet
(
config
.
previous_requests_finished
,
requests_finished
);
atomicSet
(
config
.
previous_requests_finished
,
requests_finished
);
config
.
last_printed_bytes
=
printf
(
"%s: rps=%.1f (overall: %.1f) avg_msec=%.3f (overall: %.3f)
\r
"
,
config
.
title
,
instantaneous_rps
,
rps
,
hdr_mean
(
config
.
current_sec_latency_histogram
)
/
1000
.
0
f
,
hdr_mean
(
config
.
latency_histogram
)
/
1000
.
0
f
);
int
printed_bytes
=
printf
(
"%s: rps=%.1f (overall: %.1f) avg_msec=%.3f (overall: %.3f)
\r
"
,
config
.
title
,
instantaneous_rps
,
rps
,
hdr_mean
(
config
.
current_sec_latency_histogram
)
/
1000
.
0
f
,
hdr_mean
(
config
.
latency_histogram
)
/
1000
.
0
f
);
if
(
printed_bytes
>
config
.
last_printed_bytes
){
config
.
last_printed_bytes
=
printed_bytes
;
}
hdr_reset
(
config
.
current_sec_latency_histogram
);
hdr_reset
(
config
.
current_sec_latency_histogram
);
fflush
(
stdout
);
fflush
(
stdout
);
return
250
;
/* every 250ms */
return
250
;
/* every 250ms */
...
...
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