Mercurial > public > mercurial-scm > hg-stable
diff mercurial/statprof.py @ 41387:876494fd967d
cleanup: delete lots of unused local variables
These were found by IntelliJ. There are many more, but these seemed
pretty safe.
Differential Revision: https://phab.mercurial-scm.org/D5629
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 17 Jan 2019 09:17:12 -0800 |
parents | 8664fdc1cfb3 |
children | ae189674bdad |
line wrap: on
line diff
--- a/mercurial/statprof.py Mon Sep 24 14:46:37 2018 -0700 +++ b/mercurial/statprof.py Thu Jan 17 09:17:12 2019 -0800 @@ -816,9 +816,6 @@ id2stack[-1].update(parent=parent) return myid - def endswith(a, b): - return list(a)[-len(b):] == list(b) - # The sampling profiler can sample multiple times without # advancing the clock, potentially causing the Chrome trace viewer # to render single-pixel columns that we cannot zoom in on. We @@ -858,9 +855,6 @@ # events given only stack snapshots. for sample in data.samples: - tos = sample.stack[0] - name = tos.function - path = simplifypath(tos.path) stack = tuple((('%s:%d' % (simplifypath(frame.path), frame.lineno), frame.function) for frame in sample.stack)) qstack = collections.deque(stack)