comparison mercurial/profiling.py @ 40192:b8f6a99ad89b

py3: convert sorting field to sysstr This is used as part of an attribute name check and needs to be native str. Differential Revision: https://phab.mercurial-scm.org/D5008
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 12 Oct 2018 17:31:10 +0200
parents 15a1e37f80bd
children 89703e6151e7
comparison
equal deleted inserted replaced
40191:4b7eb862692e 40192:b8f6a99ad89b
59 calltree = lsprofcalltree.KCacheGrind(p) 59 calltree = lsprofcalltree.KCacheGrind(p)
60 calltree.output(fp) 60 calltree.output(fp)
61 else: 61 else:
62 # format == 'text' 62 # format == 'text'
63 stats = lsprof.Stats(p.getstats()) 63 stats = lsprof.Stats(p.getstats())
64 stats.sort(field) 64 stats.sort(pycompat.sysstr(field))
65 stats.pprint(limit=limit, file=fp, climit=climit) 65 stats.pprint(limit=limit, file=fp, climit=climit)
66 66
67 @contextlib.contextmanager 67 @contextlib.contextmanager
68 def flameprofile(ui, fp): 68 def flameprofile(ui, fp):
69 try: 69 try: