summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui/pybootchartgui/samples.py
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-11-30 10:50:08 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-07 10:37:59 +0000
commit6b5037bf2cbf274ed3e8a7aee3fe9a1b2e039e84 (patch)
tree22f8ad9efa112da27d0e36a5452e36e9187704e8 /scripts/pybootchartgui/pybootchartgui/samples.py
parent0cd48fcef4264f338e201079e68ddb2ed8d3d68a (diff)
downloadpoky-6b5037bf2cbf274ed3e8a7aee3fe9a1b2e039e84.tar.gz
pybootchartgui: render disk space usage
This adds a new, separate chart showing the amount of disk space used over time for each volume monitored during the build. The hight of the graph entries represents the delta between current usage and minimal usage during the build. That's more useful than showing just the current usage, because then a graph showing changes in the order of MBs in a volume that is several GB large would be just flat. The legend shows the maximum of those deltas, i.e. maximum amount of space needed for the build. Minor caveat: sampling of disk space usage starts a bit later than the initial task, so the displayed value may be slightly lower than the actual amount of space needed because sampling does not record the actual initial state. (From OE-Core rev: 263d189d066b578debf08b2bd07494a69b70f70d) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/pybootchartgui/pybootchartgui/samples.py')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/samples.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py
index 015d743aa0..bedca4165a 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -53,6 +53,17 @@ class MemSample:
53 # discard incomplete samples 53 # discard incomplete samples
54 return [v for v in MemSample.used_values if v not in keys] == [] 54 return [v for v in MemSample.used_values if v not in keys] == []
55 55
56class DiskSpaceSample:
57 def __init__(self, time):
58 self.time = time
59 self.records = {}
60
61 def add_value(self, name, value):
62 self.records[name] = value
63
64 def valid(self):
65 return bool(self.records)
66
56class ProcessSample: 67class ProcessSample:
57 def __init__(self, time, state, cpu_sample): 68 def __init__(self, time, state, cpu_sample):
58 self.time = time 69 self.time = time