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
1d073a64
Unverified
Commit
1d073a64
authored
Jul 30, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Jul 30, 2018
Browse files
Merge pull request #5168 from rpv-tomsk/issue-5033
INFO CPU: higher precision of reported values
parents
2db31fd4
cd25ed17
Changes
1
Show whitespace changes
Inline
Side-by-side
src/server.c
View file @
1d073a64
...
@@ -3536,14 +3536,14 @@ sds genRedisInfoString(char *section) {
...
@@ -3536,14 +3536,14 @@ sds genRedisInfoString(char *section) {
if
(
sections
++
)
info
=
sdscat
(
info
,
"
\r\n
"
);
if
(
sections
++
)
info
=
sdscat
(
info
,
"
\r\n
"
);
info
=
sdscatprintf
(
info
,
info
=
sdscatprintf
(
info
,
"# CPU
\r\n
"
"# CPU
\r\n
"
"used_cpu_sys:%
.2f
\r\n
"
"used_cpu_sys:%
ld.%06ld
\r\n
"
"used_cpu_user:%
.2f
\r\n
"
"used_cpu_user:%
ld.%06ld
\r\n
"
"used_cpu_sys_children:%
.2f
\r\n
"
"used_cpu_sys_children:%
ld.%06ld
\r\n
"
"used_cpu_user_children:%
.2f
\r\n
"
,
"used_cpu_user_children:%
ld.%06ld
\r\n
"
,
(
f
lo
at
)
self_ru
.
ru_stime
.
tv_sec
+
(
float
)
self_ru
.
ru_stime
.
tv_usec
/
1000000
,
(
lo
ng
)
self_ru
.
ru_stime
.
tv_sec
,
(
long
)
self_ru
.
ru_stime
.
tv_usec
,
(
f
lo
at
)
self_ru
.
ru_utime
.
tv_sec
+
(
float
)
self_ru
.
ru_utime
.
tv_usec
/
1000000
,
(
lo
ng
)
self_ru
.
ru_utime
.
tv_sec
,
(
long
)
self_ru
.
ru_utime
.
tv_usec
,
(
f
lo
at
)
c_ru
.
ru_stime
.
tv_sec
+
(
float
)
c_ru
.
ru_stime
.
tv_usec
/
1000000
,
(
lo
ng
)
c_ru
.
ru_stime
.
tv_sec
,
(
long
)
c_ru
.
ru_stime
.
tv_usec
,
(
f
lo
at
)
c_ru
.
ru_utime
.
tv_sec
+
(
float
)
c_ru
.
ru_utime
.
tv_usec
/
1000000
);
(
lo
ng
)
c_ru
.
ru_utime
.
tv_sec
,
(
long
)
c_ru
.
ru_utime
.
tv_usec
);
}
}
/* Command statistics */
/* Command statistics */
...
...
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