Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
7885e126
Commit
7885e126
authored
Jan 23, 2015
by
antirez
Browse files
DEBUG structsize
Show sizes of a few important data structures in Redis. More missing.
parent
e22d7573
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/debug.c
View file @
7885e126
...
@@ -418,6 +418,13 @@ void debugCommand(redisClient *c) {
...
@@ -418,6 +418,13 @@ void debugCommand(redisClient *c) {
errstr
=
sdsmapchars
(
errstr
,
"
\n\r
"
,
" "
,
2
);
/* no newlines in errors. */
errstr
=
sdsmapchars
(
errstr
,
"
\n\r
"
,
" "
,
2
);
/* no newlines in errors. */
errstr
=
sdscatlen
(
errstr
,
"
\r\n
"
,
2
);
errstr
=
sdscatlen
(
errstr
,
"
\r\n
"
,
2
);
addReplySds
(
c
,
errstr
);
addReplySds
(
c
,
errstr
);
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"structsize"
)
&&
c
->
argc
==
2
)
{
sds
sizes
=
sdsempty
();
sizes
=
sdscatprintf
(
sizes
,
"bits:%d "
,
(
sizeof
(
void
*
)
==
8
)
?
64
:
32
);
sizes
=
sdscatprintf
(
sizes
,
"robj:%d "
,
(
int
)
sizeof
(
robj
));
sizes
=
sdscatprintf
(
sizes
,
"dictentry:%d "
,
(
int
)
sizeof
(
dictEntry
));
sizes
=
sdscatprintf
(
sizes
,
"sdshdr:%d"
,
(
int
)
sizeof
(
struct
sdshdr
));
addReplyBulkSds
(
c
,
sizes
);
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"jemalloc"
)
&&
c
->
argc
==
3
)
{
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"jemalloc"
)
&&
c
->
argc
==
3
)
{
#if defined(USE_JEMALLOC)
#if defined(USE_JEMALLOC)
if
(
!
strcasecmp
(
c
->
argv
[
2
]
->
ptr
,
"info"
))
{
if
(
!
strcasecmp
(
c
->
argv
[
2
]
->
ptr
,
"info"
))
{
...
...
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