summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui/pybootchartgui/draw.py
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-11-30 10:50:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-07 10:37:59 +0000
commit521887ea61b27b33023d6aac9df352d1fdef3ec0 (patch)
tree596664ce65044549cf11bf4ea0eef4cd90b69c13 /scripts/pybootchartgui/pybootchartgui/draw.py
parenta2c20921956bac82ba8df5e36243e9706639a4b2 (diff)
downloadpoky-521887ea61b27b33023d6aac9df352d1fdef3ec0.tar.gz
pybootchartgui: show system utilization
This enables rendering of the original bootchart charts for CPU, disk and memory usage. It depends on the /proc samples recorded by the updated buildstats.bbclass. Currently, empty charts CPU and disk usage charts are drawn if that data is not present; the memory chart already gets skipped when there's no data, which will also have to be added for the other two. (From OE-Core rev: 233d3e50b361feea07803a9c0f2a691e687c6cd5) 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/draw.py')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/draw.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 925002d6e8..bddd8048c9 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -321,6 +321,16 @@ def extents(options, xscale, trace):
321 w = int ((end - start) * sec_w_base * xscale) + 2 * off_x 321 w = int ((end - start) * sec_w_base * xscale) + 2 * off_x
322 h = proc_h * processes + header_h + 2 * off_y 322 h = proc_h * processes + header_h + 2 * off_y
323 323
324 if options.charts:
325 if trace.cpu_stats:
326 h += 30 + bar_h
327 if trace.disk_stats:
328 h += 30 + bar_h
329 if trace.monitor_disk:
330 h += 30 + bar_h
331 if trace.mem_stats:
332 h += meminfo_bar_h
333
324 return (w, h) 334 return (w, h)
325 335
326def clip_visible(clip, rect): 336def clip_visible(clip, rect):
@@ -496,6 +506,9 @@ def render(ctx, options, xscale, trace):
496 w -= 2*off_x 506 w -= 2*off_x
497 curr_y = off_y; 507 curr_y = off_y;
498 508
509 if options.charts:
510 curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
511
499 curr_y = render_processes_chart (ctx, options, trace, curr_y, w, h, sec_w) 512 curr_y = render_processes_chart (ctx, options, trace, curr_y, w, h, sec_w)
500 513
501 return 514 return
@@ -513,9 +526,6 @@ def render(ctx, options, xscale, trace):
513 else: 526 else:
514 curr_y = off_y; 527 curr_y = off_y;
515 528
516 if options.charts:
517 curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
518
519 # draw process boxes 529 # draw process boxes
520 proc_height = h 530 proc_height = h
521 if proc_tree.taskstats and options.cumulative: 531 if proc_tree.taskstats and options.cumulative: