summaryrefslogtreecommitdiff
path: root/src/buildstream/_frontend/widget.py
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2019-06-10 14:22:23 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-09 16:54:37 +0000
commitbd0dada6189934b6f11fdc0cadfe9f36b67af077 (patch)
tree931ff6429b94efe0c71e206e7f632b5c6a7e6e10 /src/buildstream/_frontend/widget.py
parent1e11d190562e641d10e2e435a8411c802eaedc81 (diff)
downloadbuildstream-bd0dada6189934b6f11fdc0cadfe9f36b67af077.tar.gz
Queue: Make queues store counts of the number of skipped/processed elements
We only seen to generate the list so we can get its length, so it is more efficient to only store a count of skipped/processed elements. failed_elements needs to remain a list for the moment, as it's used to retry a failed element job.
Diffstat (limited to 'src/buildstream/_frontend/widget.py')
-rw-r--r--src/buildstream/_frontend/widget.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildstream/_frontend/widget.py b/src/buildstream/_frontend/widget.py
index dce63e14f..20ea80d0f 100644
--- a/src/buildstream/_frontend/widget.py
+++ b/src/buildstream/_frontend/widget.py
@@ -583,13 +583,13 @@ class LogLine(Widget):
skipped_maxlen = 1
failed_maxlen = 1
for queue in stream.queues:
- processed_maxlen = max(len(str(len(queue.processed_elements))), processed_maxlen)
- skipped_maxlen = max(len(str(len(queue.skipped_elements))), skipped_maxlen)
+ processed_maxlen = max(len(str(queue.processed_elements_count)), processed_maxlen)
+ skipped_maxlen = max(len(str(queue.skipped_elements_count)), skipped_maxlen)
failed_maxlen = max(len(str(len(queue.failed_elements))), failed_maxlen)
for queue in stream.queues:
- processed = str(len(queue.processed_elements))
- skipped = str(len(queue.skipped_elements))
+ processed = str(queue.processed_elements_count)
+ skipped = str(queue.skipped_elements_count)
failed = str(len(queue.failed_elements))
processed_align = ' ' * (processed_maxlen - len(processed))