You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:48:53 UTC
[buildstream] 12/27: Revert "_frontend/status.py: Readd cache usage
to status bar"
This is an automated email from the ASF dual-hosted git repository.
not-in-ldap pushed a commit to branch aevri/check_spawn_ci_working
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 04b226f377a7d631708d0ba1e7ebb8a368eee99e
Author: Angelos Evripiotis <je...@bloomberg.net>
AuthorDate: Wed Oct 16 16:28:46 2019 +0100
Revert "_frontend/status.py: Readd cache usage to status bar"
This reverts commit 45a177a305ec5babd6b1e3ac3fea2459f143eab2.
---
src/buildstream/_frontend/status.py | 35 ++---------------------------------
1 file changed, 2 insertions(+), 33 deletions(-)
diff --git a/src/buildstream/_frontend/status.py b/src/buildstream/_frontend/status.py
index a204bd9..eb4b483 100644
--- a/src/buildstream/_frontend/status.py
+++ b/src/buildstream/_frontend/status.py
@@ -350,7 +350,7 @@ class _StatusHeader():
#
# Public members
#
- self.lines = 3
+ self.lines = 2
#
# Private members
@@ -413,38 +413,7 @@ class _StatusHeader():
line2 = self._centered(text, size, line_length, ' ')
- #
- # Line 3: Cache usage percentage report
- #
- # ~~~~~~ cache: 44.2G / 64G (69%) ~~~~~~
- #
- cas = self._context.get_cascache()
- usage = cas.get_cache_usage()
- usage_string = str(usage)
-
- if usage.used_size is None:
- # Cache usage is unknown
- size = 0
- text = ''
- else:
- size = 21
- size += len(usage_string)
- if usage.used_percent >= 95:
- formatted_usage = self._error_profile.fmt(usage_string)
- elif usage.used_percent >= 80:
- formatted_usage = self._content_profile.fmt(usage_string)
- else:
- formatted_usage = self._success_profile.fmt(usage_string)
-
- text = self._format_profile.fmt("~~~~~~ ") + \
- self._content_profile.fmt('cache') + \
- self._format_profile.fmt(': ') + \
- formatted_usage + \
- self._format_profile.fmt(' ~~~~~~')
-
- line3 = self._centered(text, size, line_length, ' ')
-
- return line1 + '\n' + line2 + '\n' + line3
+ return line1 + '\n' + line2
###################################################
# Private Methods #