|
| 1 | +from _typeshed import StrOrBytesPath |
| 2 | +from abc import ABCMeta |
| 3 | +from collections.abc import Sequence |
| 4 | + |
| 5 | +from .collector import Collector, _Frame, _StackFrames, _Timestamps |
| 6 | + |
| 7 | +class StackTraceCollector(Collector, metaclass=ABCMeta): |
| 8 | + def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ... |
| 9 | + def collect(self, stack_frames: _StackFrames, timestamps_us: _Timestamps = None) -> None: ... |
| 10 | + def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ... |
| 11 | + |
| 12 | +class CollapsedStackCollector(StackTraceCollector): |
| 13 | + def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ... |
| 14 | + def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ... |
| 15 | + def export(self, filename: StrOrBytesPath) -> None: ... |
| 16 | + |
| 17 | +class FlamegraphCollector(StackTraceCollector): |
| 18 | + def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ... |
| 19 | + def collect(self, stack_frames: _StackFrames, timestamps_us: _Timestamps = None) -> None: ... |
| 20 | + def set_stats( |
| 21 | + self, |
| 22 | + sample_interval_usec: int, |
| 23 | + duration_sec: float, |
| 24 | + sample_rate: float, |
| 25 | + error_rate: float | None = None, |
| 26 | + missed_samples: float | None = None, |
| 27 | + mode: int | None = None, |
| 28 | + ) -> None: ... |
| 29 | + def export(self, filename: StrOrBytesPath) -> None: ... |
| 30 | + def process_frames(self, frames: Sequence[_Frame], thread_id: int, weight: int = 1) -> None: ... |
| 31 | + |
| 32 | +class DiffFlamegraphCollector(FlamegraphCollector): |
| 33 | + def __init__(self, sample_interval_usec: int, *, baseline_binary_path: StrOrBytesPath, skip_idle: bool = False) -> None: ... |
0 commit comments