summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-10-16 16:28:46 +0100
committerAngelos Evripiotis <jevripiotis@bloomberg.net>2019-10-16 16:28:46 +0100
commit04b226f377a7d631708d0ba1e7ebb8a368eee99e (patch)
tree8c7c54c16c90574789a945ea4c10e09d5040ad9c
parentd1a5a5e9bc8de0b644bfde92e9245d171a9a6194 (diff)
downloadbuildstream-04b226f377a7d631708d0ba1e7ebb8a368eee99e.tar.gz
Revert "_frontend/status.py: Readd cache usage to status bar"
This reverts commit 45a177a305ec5babd6b1e3ac3fea2459f143eab2.
-rw-r--r--src/buildstream/_frontend/status.py35
1 files changed, 2 insertions, 33 deletions
diff --git a/src/buildstream/_frontend/status.py b/src/buildstream/_frontend/status.py
index a204bd9ac..eb4b4830a 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 #