aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Lin <danny@kdrag0n.dev>2019-08-20 14:30:06 -0700
committerDanny Lin <danny@kdrag0n.dev>2019-08-20 14:43:56 -0700
commit3faa8b077347d597220adf73c02388c3308994c5 (patch)
tree2ece2b59e556f8ce3cbc0821e53d6efced32b6f0
parent0769517adb9901f56933ba2e828c22d8364fbf50 (diff)
downloadschbench-3faa8b077347d597220adf73c02388c3308994c5.tar.gz
schbench: Don't print unnecessary decimal digits in percentiles
The percentiles used are 50, 75, 90, 95, 99, 99.5, and 99.9. They only require one digit of precision at most, so there's no reason to print 4 digits. Signed-off-by: Danny Lin <danny@kdrag0n.dev>
-rw-r--r--schbench.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/schbench.c b/schbench.c
index 64234c8..217f31e 100644
--- a/schbench.c
+++ b/schbench.c
@@ -338,7 +338,7 @@ static void show_latencies(struct stats *s)
if (len) {
fprintf(stderr, "Latency percentiles (usec)\n");
for (i = 0; i < len; i++)
- fprintf(stderr, "\t%s%2.4fth: %u\n",
+ fprintf(stderr, "\t%s%2.1fth: %u\n",
i == PLIST_P99 ? "*" : "",
plist[i], ovals[i]);
}