Commit 404345d8 authored by antirez's avatar antirez
Browse files

DEUBG SLEEP implemented

parent daa70b17
...@@ -281,6 +281,12 @@ void debugCommand(redisClient *c) { ...@@ -281,6 +281,12 @@ void debugCommand(redisClient *c) {
d = sdscatprintf(d, "%02x",digest[j]); d = sdscatprintf(d, "%02x",digest[j]);
addReplyStatus(c,d); addReplyStatus(c,d);
sdsfree(d); sdsfree(d);
} else if (!strcasecmp(c->argv[1]->ptr,"sleep") && c->argc == 3) {
double dtime = strtod(c->argv[2]->ptr,NULL);
long long utime = dtime*1000000;
usleep(utime);
addReply(c,shared.ok);
} else { } else {
addReplyError(c, addReplyError(c,
"Syntax error, try DEBUG [SEGFAULT|OBJECT <key>|SWAPIN <key>|SWAPOUT <key>|RELOAD]"); "Syntax error, try DEBUG [SEGFAULT|OBJECT <key>|SWAPIN <key>|SWAPOUT <key>|RELOAD]");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment