summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui
diff options
context:
space:
mode:
authorMauro Queiros <Mauro.Queiros@criticaltechworks.com>2023-05-29 10:09:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-31 16:53:04 +0100
commitb71e70374bac59a7a46b4d5ad76f9f3bd81a508d (patch)
treeeefebf3a4014fde2281441b0cd1fada9bae1e234 /scripts/pybootchartgui
parent9eb992471f01ef55c043e65ec5d16b72eb38d031 (diff)
downloadpoky-b71e70374bac59a7a46b4d5ad76f9f3bd81a508d.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: 3efebd3404de548f0757863da237f2d18ce60013) 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>
Diffstat (limited to 'scripts/pybootchartgui')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/draw.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 6d445aad4f..e71fe09ea6 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -682,6 +682,11 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
682 draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h)) 682 draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h))
683 683
684 draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h) 684 draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h)
685
686 # Show elapsed time for each task
687 elapsed_time = f"{trace.processes[process][1] - start}s"
688 draw_text(ctx, elapsed_time, PROC_TEXT_COLOR, x + w + 4, y + proc_h - 4)
689
685 y = y + proc_h 690 y = y + proc_h
686 691
687 return curr_y 692 return curr_y