MCPcopy Index your code
hub / github.com/python/cpython / print_line

Method print_line

Lib/pstats.py:509–525  ·  view source on GitHub ↗
(self, func)

Source from the content-addressed store, hash-verified

507 print('filename:lineno(function)', file=self.stream)
508
509 def print_line(self, func): # hack: should print percentages
510 cc, nc, tt, ct, callers = self.stats[func]
511 c = str(nc)
512 if nc != cc:
513 c = c + '/' + str(cc)
514 print(c.rjust(9), end=' ', file=self.stream)
515 print(f8(tt), end=' ', file=self.stream)
516 if nc == 0:
517 print(' '*8, end=' ', file=self.stream)
518 else:
519 print(f8(tt/nc), end=' ', file=self.stream)
520 print(f8(ct), end=' ', file=self.stream)
521 if cc == 0:
522 print(' '*8, end=' ', file=self.stream)
523 else:
524 print(f8(ct/cc), end=' ', file=self.stream)
525 print(func_std_string(func), file=self.stream)
526
527
528class SampledStats(Stats):

Callers 1

print_statsMethod · 0.95

Calls 4

strFunction · 0.85
f8Function · 0.85
func_std_stringFunction · 0.85
rjustMethod · 0.45

Tested by

no test coverage detected