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

Class SampledStats

Lib/pstats.py:528–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526
527
528class SampledStats(Stats):
529 def __init__(self, *args, stream=None):
530 super().__init__(*args, stream=stream)
531
532 self.sort_arg_dict = {
533 "samples" : (((1,-1), ), "sample count"),
534 "nsamples" : (((1,-1), ), "sample count"),
535 "cumtime" : (((3,-1), ), "cumulative time"),
536 "cumulative": (((3,-1), ), "cumulative time"),
537 "filename" : (((4, 1), ), "file name"),
538 "line" : (((5, 1), ), "line number"),
539 "module" : (((4, 1), ), "file name"),
540 "name" : (((6, 1), ), "function name"),
541 "nfl" : (((6, 1),(4, 1),(5, 1),), "name/file/line"),
542 "psamples" : (((0,-1), ), "primitive call count"),
543 "stdname" : (((7, 1), ), "standard name"),
544 "time" : (((2,-1), ), "internal time"),
545 "tottime" : (((2,-1), ), "internal time"),
546 }
547
548 def print_call_subheading(self, name_size):
549 print(" "*name_size + " nsamples tottime cumtime", file=self.stream)
550
551 def print_title(self):
552 print(' nsamples tottime persample cumtime persample', end=' ', file=self.stream)
553 print('filename:lineno(function)', file=self.stream)
554
555
556class TupleComp:

Callers 1

stats_factoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…