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

Method print_call_line

tools/python-3.11.9-amd64/Lib/pstats.py:475–498  ·  view source on GitHub ↗
(self, name_size, source, call_dict, arrow="->")

Source from the content-addressed store, hash-verified

473 print(" "*name_size + " ncalls tottime cumtime", file=self.stream)
474
475 def print_call_line(self, name_size, source, call_dict, arrow="->"):
476 print(func_std_string(source).ljust(name_size) + arrow, end=' ', file=self.stream)
477 if not call_dict:
478 print(file=self.stream)
479 return
480 clist = sorted(call_dict.keys())
481 indent = ""
482 for func in clist:
483 name = func_std_string(func)
484 value = call_dict[func]
485 if isinstance(value, tuple):
486 nc, cc, tt, ct = value
487 if nc != cc:
488 substats = '%d/%d' % (nc, cc)
489 else:
490 substats = '%d' % (nc,)
491 substats = '%s %s %s %s' % (substats.rjust(7+2*len(indent)),
492 f8(tt), f8(ct), name)
493 left_width = name_size + 1
494 else:
495 substats = '%s(%r) %s' % (name, value, f8(self.stats[func][3]))
496 left_width = name_size + 3
497 print(indent*left_width + substats, file=self.stream)
498 indent = " "
499
500 def print_title(self):
501 print(' ncalls tottime percall cumtime percall', end=' ', file=self.stream)

Callers 2

print_calleesMethod · 0.95
print_callersMethod · 0.95

Calls 7

func_std_stringFunction · 0.85
sortedFunction · 0.85
f8Function · 0.85
ljustMethod · 0.80
rjustMethod · 0.80
printFunction · 0.50
keysMethod · 0.45

Tested by

no test coverage detected