aboutsummaryrefslogtreecommitdiffstats
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:36:10 +0000
commit233d3e50b361feea07803a9c0f2a691e687c6cd5 (patch)
treed1f122f8c29f8f30e08a4f1eb5d0fe3fc3f5ed19 /scripts/pybootchartgui/pybootchartgui/draw.py
parent166f8f9aaa1f01fc6d6a5451f8f06b815c51ffae (diff)
downloadopenembedded-core-contrib-233d3e50b361feea07803a9c0f2a691e687c6cd5.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. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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):
w = int ((end - start) * sec_w_base * xscale) + 2 * off_x
h = proc_h * processes + header_h + 2 * off_y
+ if options.charts:
+ if trace.cpu_stats:
+ h += 30 + bar_h
+ if trace.disk_stats:
+ h += 30 + bar_h
+ if trace.monitor_disk:
+ h += 30 + bar_h
+ if trace.mem_stats:
+ h += meminfo_bar_h
+
return (w, h)
def clip_visible(clip, rect):
@@ -496,6 +506,9 @@ def render(ctx, options, xscale, trace):
w -= 2*off_x
curr_y = off_y;
+ 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)
return
@@ -513,9 +526,6 @@ def render(ctx, options, xscale, trace):
else:
curr_y = off_y;
- if options.charts:
- curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
-
# draw process boxes
proc_height = h
if proc_tree.taskstats and options.cumulative: