MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / print_line

Method print_line

tools/python-3.11.9-amd64/Lib/pstats.py:504–520  ·  view source on GitHub ↗
(self, func)

Source from the content-addressed store, hash-verified

502 print('filename:lineno(function)', file=self.stream)
503
504 def print_line(self, func): # hack: should print percentages
505 cc, nc, tt, ct, callers = self.stats[func]
506 c = str(nc)
507 if nc != cc:
508 c = c + '/' + str(cc)
509 print(c.rjust(9), end=' ', file=self.stream)
510 print(f8(tt), end=' ', file=self.stream)
511 if nc == 0:
512 print(' '*8, end=' ', file=self.stream)
513 else:
514 print(f8(tt/nc), end=' ', file=self.stream)
515 print(f8(ct), end=' ', file=self.stream)
516 if cc == 0:
517 print(' '*8, end=' ', file=self.stream)
518 else:
519 print(f8(ct/cc), end=' ', file=self.stream)
520 print(func_std_string(func), file=self.stream)
521
522class TupleComp:
523 """This class provides a generic function for comparing any two tuples.

Callers 1

print_statsMethod · 0.95

Calls 5

strFunction · 0.85
f8Function · 0.85
func_std_stringFunction · 0.85
rjustMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected