Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
pulkit |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/lsprof.py (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Gregory Szorc | Oct 12 2018, 11:35 AM |
def pprint(self, top=None, file=None, limit=None, climit=None): | def pprint(self, top=None, file=None, limit=None, climit=None): | ||||
"""XXX docstring""" | """XXX docstring""" | ||||
if file is None: | if file is None: | ||||
file = sys.stdout | file = sys.stdout | ||||
d = self.data | d = self.data | ||||
if top is not None: | if top is not None: | ||||
d = d[:top] | d = d[:top] | ||||
cols = "% 12s %12s %11.4f %11.4f %s\n" | cols = "% 12d %12d %11.4f %11.4f %s\n" | ||||
hcols = "% 12s %12s %12s %12s %s\n" | hcols = "% 12s %12s %12s %12s %s\n" | ||||
file.write(hcols % ("CallCount", "Recursive", "Total(s)", | file.write(hcols % ("CallCount", "Recursive", "Total(s)", | ||||
"Inline(s)", "module:lineno(function)")) | "Inline(s)", "module:lineno(function)")) | ||||
count = 0 | count = 0 | ||||
for e in d: | for e in d: | ||||
file.write(cols % (e.callcount, e.reccallcount, e.totaltime, | file.write(cols % (e.callcount, e.reccallcount, e.totaltime, | ||||
e.inlinetime, label(e.code))) | e.inlinetime, label(e.code))) | ||||
count += 1 | count += 1 |