diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2013-11-14 15:11:16 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-18 12:42:49 +0000 |
commit | 5f1b8730f90099c0f73a6b08599990ee71e831b5 (patch) | |
tree | 0d6b1626527f647ef500ec3bc7f92d432dd3d533 /scripts/pybootchartgui/pybootchartgui/draw.py | |
parent | bd0bde6d04fd6cd9f8e7773d68da127144afa7de (diff) | |
download | openembedded-core-contrib-5f1b8730f90099c0f73a6b08599990ee71e831b5.tar.gz |
pybootchartgui: Make "Show more" show all processes
While "Show more" is enabled, all processes are shown, regardless of
--mintime.
This also has the added benefit of making the first shown bar start at
its correct offset from the start time, rather than always starting at
0.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.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.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py index a22ac802f7..2aa348ba70 100644 --- a/scripts/pybootchartgui/pybootchartgui/draw.py +++ b/scripts/pybootchartgui/pybootchartgui/draw.py @@ -297,10 +297,20 @@ OPTIONS = None def extents(options, xscale, trace): start = min(trace.start.keys()) - end = max(trace.end.keys()) + end = start - w = int ((end - start) * sec_w_base * xscale) + 2*off_x - h = proc_h * len(trace.processes) + header_h + 2 * off_y + processes = 0 + for proc in trace.processes: + if not options.app_options.show_all and \ + trace.processes[proc][1] - trace.processes[proc][0] < options.app_options.mintime: + continue + + if trace.processes[proc][1] > end: + end = trace.processes[proc][1] + processes += 1 + + w = int ((end - start) * sec_w_base * xscale) + 2 * off_x + h = proc_h * processes + header_h + 2 * off_y return (w, h) @@ -419,6 +429,9 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w): offset = min(trace.start.keys()) for s in sorted(trace.start.keys()): for val in sorted(trace.start[s]): + if not options.app_options.show_all and \ + trace.processes[val][1] - s < options.app_options.mintime: + continue task = val.split(":")[1] #print val #print trace.processes[val][1] |