aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2022-08-03 16:50:12 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2022-09-27 13:14:46 +0200
commit8951eab7869cb722723d5816f8790d951c14cc02 (patch)
treef1712f13a1cd60181dcd96aaeae5eedd7ba083f1
parent123f206ce8e0915e24f20c1d4cd246c08f7c1fe1 (diff)
downloadopenembedded-core-contrib-jansa/master.tar.gz
openembedded-core-contrib-jansa/master.tar.bz2
openembedded-core-contrib-jansa/master.zip
pybootchartgui: render just pressure graphs and print max values on stdoutjansa/master
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--scripts/pybootchartgui/pybootchartgui/draw.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 4326361426..9b1f1ca7ba 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -377,6 +377,11 @@ def clip_visible(clip, rect):
def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
proc_tree = options.proc_tree(trace)
+ trace.cpu_stats = []
+ trace.disk_stats = []
+ trace.monitor_disk = []
+ trace.mem_stats = []
+
# render bar legend
if trace.cpu_stats:
ctx.set_font_size(LEGEND_FONT_SIZE)
@@ -435,6 +440,8 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
if trace.cpu_pressure:
max_sample_avg = max (trace.cpu_pressure, key = lambda s: s.avg10)
max_sample_total = max (trace.cpu_pressure, key = lambda s: s.deltaTotal)
+ print("avg10 CPU Pressure (max %d%%)" % (max_sample_avg.avg10))
+ print("delta total CPU Pressure (max %d)" % (max_sample_total.deltaTotal))
draw_legend_line(ctx, "avg10 CPU Pressure (max %d%%)" % (max_sample_avg.avg10), CPU_PRESSURE_AVG10_COLOR, off_x, curr_y+20, leg_s)
draw_legend_box(ctx, "delta total CPU Pressure (max %d)" % (max_sample_total.deltaTotal), CPU_PRESSURE_TOTAL_COLOR, off_x + 240, curr_y+20, leg_s)
@@ -469,6 +476,8 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
if trace.io_pressure:
max_sample_avg = max (trace.io_pressure, key = lambda s: s.avg10)
max_sample_total = max (trace.io_pressure, key = lambda s: s.deltaTotal)
+ print("avg10 I/O Pressure (max %d%%)" % (max_sample_avg.avg10))
+ print("delta total I/O Pressure (max %d)" % (max_sample_total.deltaTotal))
draw_legend_line(ctx, "avg10 I/O Pressure (max %d%%)" % (max_sample_avg.avg10), IO_PRESSURE_AVG10_COLOR, off_x, curr_y+20, leg_s)
draw_legend_box(ctx, "delta total I/O Pressure (max %d)" % (max_sample_total.deltaTotal), IO_PRESSURE_TOTAL_COLOR, off_x + 240, curr_y+20, leg_s)
@@ -503,6 +512,8 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
if trace.mem_pressure:
max_sample_avg = max (trace.mem_pressure, key = lambda s: s.avg10)
max_sample_total = max (trace.mem_pressure, key = lambda s: s.deltaTotal)
+ print("avg10 MEM Pressure (max %d%%)" % (max_sample_avg.avg10))
+ print("delta total MEM Pressure (max %d)" % (max_sample_total.deltaTotal))
draw_legend_line(ctx, "avg10 MEM Pressure (max %d%%)" % (max_sample_avg.avg10), MEM_PRESSURE_AVG10_COLOR, off_x, curr_y+20, leg_s)
draw_legend_box(ctx, "delta total MEM Pressure (max %d)" % (max_sample_total.deltaTotal), MEM_PRESSURE_TOTAL_COLOR, off_x + 240, curr_y+20, leg_s)
@@ -701,7 +712,7 @@ def render(ctx, options, xscale, trace):
if options.charts:
curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
- curr_y = render_processes_chart (ctx, options, trace, curr_y, w, h, sec_w)
+ # curr_y = render_processes_chart (ctx, options, trace, curr_y, w, h, sec_w)
return