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
fe67418b
Commit
fe67418b
authored
Nov 21, 2018
by
antirez
Browse files
RESP3: Use new deferred len API in object.c.
parent
13966522
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/object.c
View file @
fe67418b
...
@@ -1326,7 +1326,7 @@ NULL
...
@@ -1326,7 +1326,7 @@ NULL
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"stats"
)
&&
c
->
argc
==
2
)
{
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"stats"
)
&&
c
->
argc
==
2
)
{
struct
redisMemOverhead
*
mh
=
getMemoryOverheadData
();
struct
redisMemOverhead
*
mh
=
getMemoryOverheadData
();
addReplyM
ultiBulk
Len
(
c
,
(
25
+
mh
->
num_dbs
)
*
2
)
;
addReplyM
ap
Len
(
c
,
25
+
mh
->
num_dbs
);
addReplyBulkCString
(
c
,
"peak.allocated"
);
addReplyBulkCString
(
c
,
"peak.allocated"
);
addReplyLongLong
(
c
,
mh
->
peak_allocated
);
addReplyLongLong
(
c
,
mh
->
peak_allocated
);
...
@@ -1356,7 +1356,7 @@ NULL
...
@@ -1356,7 +1356,7 @@ NULL
char
dbname
[
32
];
char
dbname
[
32
];
snprintf
(
dbname
,
sizeof
(
dbname
),
"db.%zd"
,
mh
->
db
[
j
].
dbid
);
snprintf
(
dbname
,
sizeof
(
dbname
),
"db.%zd"
,
mh
->
db
[
j
].
dbid
);
addReplyBulkCString
(
c
,
dbname
);
addReplyBulkCString
(
c
,
dbname
);
addReplyM
ultiBulk
Len
(
c
,
4
);
addReplyM
ap
Len
(
c
,
2
);
addReplyBulkCString
(
c
,
"overhead.hashtable.main"
);
addReplyBulkCString
(
c
,
"overhead.hashtable.main"
);
addReplyLongLong
(
c
,
mh
->
db
[
j
].
overhead_ht_main
);
addReplyLongLong
(
c
,
mh
->
db
[
j
].
overhead_ht_main
);
...
...
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