summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2023-01-02 20:46:25 +0100
committerJoel Rosdahl <joel@rosdahl.net>2023-01-11 19:42:32 +0100
commit26f8e94b86df915a33152f35697b5446442efb1b (patch)
tree83e4dac24b0c99953fab9a01177d5f8bd1e7124b
parent958cbfee8f4f8da6cc3af0787120f5a2713560f4 (diff)
downloadccache-26f8e94b86df915a33152f35697b5446442efb1b.tar.gz
feat: Consistently show cache size and max size with one decimal
-rw-r--r--src/core/Statistics.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/Statistics.cpp b/src/core/Statistics.cpp
index 13302fe9..e76ea5e0 100644
--- a/src/core/Statistics.cpp
+++ b/src/core/Statistics.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2021-2022 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
@@ -323,11 +323,11 @@ Statistics::format_human_readable(const Config& config,
if (!from_log) {
std::vector<C> size_cells{
" Cache size (GB):",
- C(FMT("{:.2f}", static_cast<double>(local_size) / g)).right_align()};
+ C(FMT("{:.1f}", static_cast<double>(local_size) / g)).right_align()};
if (config.max_size() != 0) {
size_cells.emplace_back("/");
size_cells.emplace_back(
- C(FMT("{:.2f}", static_cast<double>(config.max_size()) / g))
+ C(FMT("{:.1f}", static_cast<double>(config.max_size()) / g))
.right_align());
size_cells.emplace_back(percent(local_size, config.max_size()));
}