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>
This commit is contained in:
Patrick Ohly
2016-11-30 10:50:08 +01:00
committed by Richard Purdie
parent 0cd48fcef4
commit 6b5037bf2c
3 changed files with 99 additions and 0 deletions

View File

@@ -53,6 +53,17 @@ class MemSample:
# discard incomplete samples
return [v for v in MemSample.used_values if v not in keys] == []
class DiskSpaceSample:
def __init__(self, time):
self.time = time
self.records = {}
def add_value(self, name, value):
self.records[name] = value
def valid(self):
return bool(self.records)
class ProcessSample:
def __init__(self, time, state, cpu_sample):
self.time = time