changeset 42833:3f81d58aae25

statprof: clarify by naming tuple members while enumerate()'ing Differential Revision: https://phab.mercurial-scm.org/D6778
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 30 Aug 2019 15:12:37 -0700
parents a3c2ffcd266f
children c085cb134b9e
files mercurial/statprof.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/statprof.py	Mon Aug 05 17:25:24 2019 +0200
+++ b/mercurial/statprof.py	Fri Aug 30 15:12:37 2019 -0700
@@ -878,7 +878,8 @@
         laststack = collections.deque(stack)
     while laststack:
         poplast()
-    events = [s[1] for s in enumerate(samples) if s[0] not in blacklist]
+    events = [sample for idx, sample in enumerate(samples)
+              if idx not in blacklist]
     frames = collections.OrderedDict((str(k), v)
                                      for (k,v) in enumerate(id2stack))
     json.dump(dict(traceEvents=events, stackFrames=frames), fp, indent=1)