diff options
Diffstat (limited to 'scripts/pybootchartgui')
| -rw-r--r-- | scripts/pybootchartgui/pybootchartgui/draw.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py index e71fe09ea6..ddfa9a6192 100644 --- a/scripts/pybootchartgui/pybootchartgui/draw.py +++ b/scripts/pybootchartgui/pybootchartgui/draw.py | |||
| @@ -646,8 +646,9 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w): | |||
| 646 | offset = trace.min or min(trace.start.keys()) | 646 | offset = trace.min or min(trace.start.keys()) |
| 647 | for start in sorted(trace.start.keys()): | 647 | for start in sorted(trace.start.keys()): |
| 648 | for process in sorted(trace.start[start]): | 648 | for process in sorted(trace.start[start]): |
| 649 | elapsed_time = trace.processes[process][1] - start | ||
| 649 | if not options.app_options.show_all and \ | 650 | if not options.app_options.show_all and \ |
| 650 | trace.processes[process][1] - start < options.app_options.mintime: | 651 | elapsed_time < options.app_options.mintime: |
| 651 | continue | 652 | continue |
| 652 | task = process.split(":")[1] | 653 | task = process.split(":")[1] |
| 653 | 654 | ||
| @@ -656,7 +657,7 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w): | |||
| 656 | #print(s) | 657 | #print(s) |
| 657 | 658 | ||
| 658 | x = chart_rect[0] + (start - offset) * sec_w | 659 | x = chart_rect[0] + (start - offset) * sec_w |
| 659 | w = ((trace.processes[process][1] - start) * sec_w) | 660 | w = elapsed_time * sec_w |
| 660 | 661 | ||
| 661 | #print("proc at %s %s %s %s" % (x, y, w, proc_h)) | 662 | #print("proc at %s %s %s %s" % (x, y, w, proc_h)) |
| 662 | col = None | 663 | col = None |
| @@ -684,7 +685,6 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w): | |||
| 684 | draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h) | 685 | draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h) |
| 685 | 686 | ||
| 686 | # Show elapsed time for each task | 687 | # 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) | 688 | draw_text(ctx, elapsed_time, PROC_TEXT_COLOR, x + w + 4, y + proc_h - 4) |
| 689 | 689 | ||
| 690 | y = y + proc_h | 690 | y = y + proc_h |
