mirror of
https://github.com/python/cpython.git
synced 2025-11-03 07:01:21 +00:00
Implement a statistical sampling profiler that can profile external Python processes by PID. Uses the _remote_debugging module and converts the results to pstats-compatible format for analysis. Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
11 lines
273 B
Python
11 lines
273 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class Collector(ABC):
|
|
@abstractmethod
|
|
def collect(self, stack_frames):
|
|
"""Collect profiling data from stack frames."""
|
|
|
|
@abstractmethod
|
|
def export(self, filename):
|
|
"""Export collected data to a file."""
|