|
| 1 | +from _typeshed import StrOrBytesPath |
| 2 | +from abc import ABC |
| 3 | + |
| 4 | +__all__ = [ |
| 5 | + "Collector", |
| 6 | + "PstatsCollector", |
| 7 | + "CollapsedStackCollector", |
| 8 | + "HeatmapCollector", |
| 9 | + "GeckoCollector", |
| 10 | + "JsonlCollector", |
| 11 | + "StringTable", |
| 12 | +] |
| 13 | + |
| 14 | +class Collector(ABC): |
| 15 | + def collect(self, stack_frames, timestamps_us=None) -> None: ... |
| 16 | + def collect_failed_sample(self) -> None: ... |
| 17 | + def export(self, filename: StrOrBytesPath) -> None: ... |
| 18 | + |
| 19 | +class PstatsCollector(Collector): |
| 20 | + def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ... |
| 21 | + def create_stats(self) -> None: ... |
| 22 | + def print_stats(self, sort=-1, limit: int | None = None, show_summary: bool = True, mode=None) -> None: ... |
| 23 | + |
| 24 | +class CollapsedStackCollector(Collector): |
| 25 | + def __init__(self, *args, **kwargs) -> None: ... |
| 26 | + def process_frames(self, frames, thread_id: int, weight: int = 1) -> None: ... |
| 27 | + |
| 28 | +class HeatmapCollector(Collector): |
| 29 | + FILE_INDEX_FORMAT: str |
| 30 | + def __init__(self, *args, **kwargs) -> None: ... |
| 31 | + def process_frames(self, frames, thread_id: int, weight: int = 1) -> None: ... |
| 32 | + def set_stats( |
| 33 | + self, |
| 34 | + sample_interval_usec: int, |
| 35 | + duration_sec: float, |
| 36 | + sample_rate: float, |
| 37 | + error_rate: float | None = None, |
| 38 | + missed_samples: int | None = None, |
| 39 | + **kwargs, |
| 40 | + ) -> None: ... |
| 41 | + |
| 42 | +class GeckoCollector(Collector): |
| 43 | + def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False, opcodes: bool = False) -> None: ... |
| 44 | + |
| 45 | +class JsonlCollector(Collector): |
| 46 | + def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False, mode=None) -> None: ... |
| 47 | + def process_frames(self, frames, _thread_id: int, weight: int = 1) -> None: ... |
| 48 | + |
| 49 | +class StringTable: |
| 50 | + def intern(self, string: object) -> int: ... |
| 51 | + def get_string(self, index: int) -> str: ... |
| 52 | + def get_strings(self) -> list[str]: ... |
| 53 | + def __len__(self) -> int: ... |
0 commit comments