pybootchartgui: render cpu and io pressure

Add two new, separate charts showing the avg10 and delta
total pressure over time for the CPU and IO resources. The height of
the avg10 data in each chart represents the percentage of time "some"
task was delayed over the specific resource during the last 10
seconds of the build. The height of the delta total data in each chart
represents the total time "some" task was delayed since the last sample
was collected. If the reduced_proc_pressure data is not present in the
buildstats log, then the new charts are not shown at all rather than
being present but unpopulated.

Note that the delta total graphs may appear "spikey",
oscillating from high values to low. This behaviour is fixed in a
subsequent commit.

(From OE-Core rev: fb9ff46dc3059cb3f4c8df8e4654184c3eab1571)

Signed-off-by: Aryaman Gupta <aryaman.gupta@windriver.com>
Signed-off-by: Randy MacLeod <randy.macleod@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Aryaman Gupta
2022-06-22 15:21:04 -04:00
committed by Richard Purdie
parent ac162116b3
commit 45f1e9d953
3 changed files with 122 additions and 0 deletions

View File

@@ -37,6 +37,23 @@ class CPUSample:
return str(self.time) + "\t" + str(self.user) + "\t" + \
str(self.sys) + "\t" + str(self.io) + "\t" + str (self.swap)
class CPUPressureSample:
def __init__(self, time, avg10, avg60, avg300, deltaTotal):
self.time = time
self.avg10 = avg10
self.avg60 = avg60
self.avg300 = avg300
self.deltaTotal = deltaTotal
class IOPressureSample:
def __init__(self, time, avg10, avg60, avg300, deltaTotal):
self.time = time
self.avg10 = avg10
self.avg60 = avg60
self.avg300 = avg300
self.deltaTotal = deltaTotal
class MemSample:
used_values = ('MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree',)