Mercurial > public > mercurial-scm > hg
comparison mercurial/lsprof.py @ 35836:d4e5b2653693
lsprof: use native string when peeking in __dict__
# skip-blame just an r prefix on a string literal
Differential Revision: https://phab.mercurial-scm.org/D1895
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 17 Jan 2018 21:45:15 -0500 |
parents | b1a59b80e1a3 |
children | b25fbe7e494e |
comparison
equal
deleted
inserted
replaced
35835:bf367a93f000 | 35836:d4e5b2653693 |
---|---|
25 """XXX docstring""" | 25 """XXX docstring""" |
26 | 26 |
27 def __init__(self, data): | 27 def __init__(self, data): |
28 self.data = data | 28 self.data = data |
29 | 29 |
30 def sort(self, crit="inlinetime"): | 30 def sort(self, crit=r"inlinetime"): |
31 """XXX docstring""" | 31 """XXX docstring""" |
32 # profiler_entries isn't defined when running under PyPy. | 32 # profiler_entries isn't defined when running under PyPy. |
33 if profiler_entry: | 33 if profiler_entry: |
34 if crit not in profiler_entry.__dict__: | 34 if crit not in profiler_entry.__dict__: |
35 raise ValueError("Can't sort by %s" % crit) | 35 raise ValueError("Can't sort by %s" % crit) |