mirror of
https://github.com/python/cpython.git
synced 2026-01-17 21:00:12 +00:00
The stack collector base class keeps all frames until export() is called, which causes significant unnecessary memory usage. Instead, we can process the frames on the fly in the collect call by dispatching the aggregation logic to the subclass through the process_frames method. Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
12 lines
432 B
Python
12 lines
432 B
Python
"""Statistical sampling profiler for Python.
|
|
|
|
This module provides low-overhead profiling by periodically sampling the
|
|
call stack rather than tracing every function call.
|
|
"""
|
|
|
|
from .collector import Collector
|
|
from .pstats_collector import PstatsCollector
|
|
from .stack_collector import CollapsedStackCollector
|
|
from .string_table import StringTable
|
|
|
|
__all__ = ("Collector", "PstatsCollector", "CollapsedStackCollector", "StringTable")
|