diff options
author | Mauro Queiros <Mauro.Queiros@criticaltechworks.com> | 2023-07-10 14:34:47 +0000 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-07-21 06:27:34 -1000 |
commit | 71cb6bd31ceb41aa25068a44c9c3fdc0021f3458 (patch) | |
tree | 7775b6a2f839234cbef1cf3977c81225c1ddc8b4 /scripts | |
parent | 3bf387217f3db76078c2fb3ac88d3c06e9bb78dd (diff) | |
download | poky-71cb6bd31ceb41aa25068a44c9c3fdc0021f3458.tar.gz |
pybootchartgui: show elapsed time for each task
Currently, finding the elapsed time of each task in buildtimes.svg
is a manual effort of checking the top axis and finding and subtracting
the end and start time of the task.
This change adds the elapsed time for each task, so that
manual effort of comparing start/end time is avoided.
(From OE-Core rev: b2678422b411ccbd19a7b198c872b92077567391)
Signed-off-by: Mauro Queiros <Mauro.Queiros@criticaltechworks.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3efebd3404de548f0757863da237f2d18ce60013)
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/pybootchartgui/pybootchartgui/draw.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py index fc708b55c3..707e7fe427 100644 --- a/scripts/pybootchartgui/pybootchartgui/draw.py +++ b/scripts/pybootchartgui/pybootchartgui/draw.py | |||
@@ -558,6 +558,11 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w): | |||
558 | draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h)) | 558 | draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h)) |
559 | 559 | ||
560 | draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h) | 560 | draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h) |
561 | |||
562 | # Show elapsed time for each task | ||
563 | elapsed_time = f"{trace.processes[process][1] - start}s" | ||
564 | draw_text(ctx, elapsed_time, PROC_TEXT_COLOR, x + w + 4, y + proc_h - 4) | ||
565 | |||
561 | y = y + proc_h | 566 | y = y + proc_h |
562 | 567 | ||
563 | return curr_y | 568 | return curr_y |