From d048f9721ceb8a90618dff3461c0cc121e90b9ff Mon Sep 17 00:00:00 2001 From: cbgbt Date: Thu, 1 Dec 2016 02:33:01 -0800 Subject: [PATCH] cli: Only print elapsed time on OUTPUT_STANDARD --- src/redis-cli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index 0cb74bf0..ee24cf3c 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1353,7 +1353,9 @@ static void repl(void) { } elapsed = mstime()-start_time; - if (elapsed >= 500) { + if (elapsed >= 500 && + config.output == OUTPUT_STANDARD) + { printf("(%.2fs)\n",(double)elapsed/1000); } }