From dffa007f8601b79c6c2db9bca3908973d7f4593d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 17 May 2018 10:04:18 -0500 Subject: [PATCH] include/types: space between number and units not client: 504B/s rd, 10.6MiB/s wr, 0op/s rd, 30op/s wr but client: 504 B/s rd, 10.6 MiB/s wr, 0 op/s rd, 30 op/s wr This was changed as part of d3cecebacdcebcf475808a6204de22dfa94d729d. Signed-off-by: Sage Weil (cherry picked from commit 9cbd283bc60c35f84458a343421f513508ae0f04) --- src/include/types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/types.h b/src/include/types.h index 5169f6b32cde5..df4d3e1a24563 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -363,11 +363,11 @@ namespace { char buffer[32]; if (index == 0) { - (void) snprintf(buffer, sizeof(buffer), "%" PRId64 "%s", n, u); + (void) snprintf(buffer, sizeof(buffer), "%" PRId64 " %s", n, u); } else if ((v % mult) == 0) { // If this is an even multiple of the base, always display // without any decimal fraction. - (void) snprintf(buffer, sizeof(buffer), "%" PRId64 "%s", n, u); + (void) snprintf(buffer, sizeof(buffer), "%" PRId64 " %s", n, u); } else { // We want to choose a precision that reflects the best choice // for fitting in 5 characters. This can get rather tricky when @@ -378,7 +378,7 @@ namespace { // easier just to try each combination in turn. int i; for (i = 2; i >= 0; i--) { - if (snprintf(buffer, sizeof(buffer), "%.*f%s", i, + if (snprintf(buffer, sizeof(buffer), "%.*f %s", i, static_cast(v) / mult, u) <= 7) break; } -- 2.39.5