summaryrefslogtreecommitdiffstats
path: root/scripts/pybootchartgui/pybootchartgui/draw.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/pybootchartgui/pybootchartgui/draw.py')
-rw-r--r--scripts/pybootchartgui/pybootchartgui/draw.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 019070a7db..99b3caacc7 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -19,6 +19,7 @@ import math
19import re 19import re
20import random 20import random
21import colorsys 21import colorsys
22import functools
22from operator import itemgetter 23from operator import itemgetter
23 24
24class RenderOptions: 25class RenderOptions:
@@ -449,7 +450,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
449 [(sample.time, 450 [(sample.time,
450 # Sum up used space of all volumes including the current one 451 # Sum up used space of all volumes including the current one
451 # so that the graphs appear as stacked on top of each other. 452 # so that the graphs appear as stacked on top of each other.
452 reduce(lambda x,y: x+y, 453 functools.reduce(lambda x,y: x+y,
453 [sample.records[volume] - min_used[volume] 454 [sample.records[volume] - min_used[volume]
454 for volume in volumes[0:i] 455 for volume in volumes[0:i]
455 if volume in sample.records], 456 if volume in sample.records],
@@ -501,7 +502,7 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
501 TASK_COLOR_SYSROOT, off_x+360, curr_y + 45, leg_s) 502 TASK_COLOR_SYSROOT, off_x+360, curr_y + 45, leg_s)
502 draw_legend_box (ctx, "Package", \ 503 draw_legend_box (ctx, "Package", \
503 TASK_COLOR_PACKAGE, off_x+480, curr_y + 45, leg_s) 504 TASK_COLOR_PACKAGE, off_x+480, curr_y + 45, leg_s)
504 draw_legend_box (ctx, "Package Write", 505 draw_legend_box (ctx, "Package Write", \
505 TASK_COLOR_PACKAGE_WRITE, off_x+600, curr_y + 45, leg_s) 506 TASK_COLOR_PACKAGE_WRITE, off_x+600, curr_y + 45, leg_s)
506 507
507 ctx.set_font_size(PROC_TEXT_FONT_SIZE) 508 ctx.set_font_size(PROC_TEXT_FONT_SIZE)
@@ -518,13 +519,14 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
518 trace.processes[val][1] - s < options.app_options.mintime: 519 trace.processes[val][1] - s < options.app_options.mintime:
519 continue 520 continue
520 task = val.split(":")[1] 521 task = val.split(":")[1]
521 #print val 522 #print(val)
522 #print trace.processes[val][1] 523 #print(trace.processes[val][1])
523 #print s 524 #print(s)
525
524 x = chart_rect[0] + (s - offset) * sec_w 526 x = chart_rect[0] + (s - offset) * sec_w
525 w = ((trace.processes[val][1] - s) * sec_w) 527 w = ((trace.processes[val][1] - s) * sec_w)
526 528
527 #print "proc at %s %s %s %s" % (x, y, w, proc_h) 529 #print("proc at %s %s %s %s" % (x, y, w, proc_h))
528 col = None 530 col = None
529 if task == "do_compile": 531 if task == "do_compile":
530 col = TASK_COLOR_COMPILE 532 col = TASK_COLOR_COMPILE