From e5db99ad4acfa22e28056a480b106ff7b06a0120 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 85ca404f..d25b7feb 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1344,7 +1344,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); } }