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

Method collect

Lib/profiling/sampling/pstats_collector.py:56–59  ·  view source on GitHub ↗
(self, stack_frames, timestamps_us=None)

Source from the content-addressed store, hash-verified

54 self.callers[callee][caller] += weight
55
56 def collect(self, stack_frames, timestamps_us=None):
57 weight = len(timestamps_us) if timestamps_us else 1
58 for frames, _ in self._iter_stacks(stack_frames, skip_idle=self.skip_idle):
59 self._process_frames(frames, weight=weight)
60
61 def export(self, filename):
62 self.create_stats()

Calls 2

_process_framesMethod · 0.95
_iter_stacksMethod · 0.80