[oe-commits] [openembedded-core] 06/30: scripts/pybootchart/draw: Clarify some variable names

git at git.openembedded.org git at git.openembedded.org
Wed May 8 11:23:14 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 2fde898454e961fbd5b0db13265a6f1d35338a31
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed May 8 11:49:49 2019 +0100

    scripts/pybootchart/draw: Clarify some variable names
    
    This tweaks some intermediate variable names to make it clearer what
    is being done.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/pybootchartgui/pybootchartgui/draw.py | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 99b3caa..b318441 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -513,18 +513,19 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
     y = curr_y+header_h
 
     offset = trace.min or min(trace.start.keys())
-    for s in sorted(trace.start.keys()):
-        for val in sorted(trace.start[s]):
+    for start in sorted(trace.start.keys()):
+        for process in sorted(trace.start[start]):
             if not options.app_options.show_all and \
-                    trace.processes[val][1] - s < options.app_options.mintime:
+                    trace.processes[process][1] - start < options.app_options.mintime:
                 continue
-            task = val.split(":")[1]
-            #print(val)
-            #print(trace.processes[val][1])
+            task = process.split(":")[1]
+
+            #print(process)
+            #print(trace.processes[process][1])
             #print(s)
 
-            x = chart_rect[0] + (s - offset) * sec_w
-            w = ((trace.processes[val][1] - s) * sec_w)
+            x = chart_rect[0] + (start - offset) * sec_w
+            w = ((trace.processes[process][1] - start) * sec_w)
 
             #print("proc at %s %s %s %s" % (x, y, w, proc_h))
             col = None
@@ -549,7 +550,7 @@ def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
                 draw_fill_rect(ctx, col, (x, y, w, proc_h))
             draw_rect(ctx, PROC_BORDER_COLOR, (x, y, w, proc_h))
 
-            draw_label_in_box(ctx, PROC_TEXT_COLOR, val, x, y + proc_h - 4, w, proc_h)
+            draw_label_in_box(ctx, PROC_TEXT_COLOR, process, x, y + proc_h - 4, w, proc_h)
             y = y + proc_h
 
     return curr_y

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list