Skip to content

Commit 84d876f

Browse files
committed
Complete profiling collector methods
1 parent 5be2eda commit 84d876f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

stdlib/profiling/sampling.pyi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,22 @@ class Collector(ABC):
2222

2323
class PstatsCollector(Collector):
2424
def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False) -> None: ...
25+
def collect(self, stack_frames, timestamps_us=None) -> None: ...
26+
def export(self, filename: StrOrBytesPath) -> None: ...
2527
def create_stats(self) -> None: ...
2628
def print_stats(self, sort=-1, limit: int | None = None, show_summary: bool = True, mode=None) -> None: ...
2729

2830
class CollapsedStackCollector(Collector):
2931
def __init__(self, *args, **kwargs) -> None: ...
32+
def collect(self, stack_frames, timestamps_us=None) -> None: ...
33+
def export(self, filename: StrOrBytesPath) -> None: ...
3034
def process_frames(self, frames, thread_id: int, weight: int = 1) -> None: ...
3135

3236
class HeatmapCollector(Collector):
3337
FILE_INDEX_FORMAT: str
3438
def __init__(self, *args, **kwargs) -> None: ...
39+
def collect(self, stack_frames, timestamps_us=None) -> None: ...
40+
def export(self, output_path: StrOrBytesPath) -> None: ...
3541
def process_frames(self, frames, thread_id: int, weight: int = 1) -> None: ...
3642
def set_stats(
3743
self,
@@ -45,9 +51,13 @@ class HeatmapCollector(Collector):
4551

4652
class GeckoCollector(Collector):
4753
def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False, opcodes: bool = False) -> None: ...
54+
def collect(self, stack_frames, timestamps_us=None) -> None: ...
55+
def export(self, filename: StrOrBytesPath) -> None: ...
4856

4957
class JsonlCollector(Collector):
5058
def __init__(self, sample_interval_usec: int, *, skip_idle: bool = False, mode=None) -> None: ...
59+
def collect(self, stack_frames, timestamps_us=None) -> None: ...
60+
def export(self, filename: StrOrBytesPath) -> None: ...
5161
def process_frames(self, frames, _thread_id: int, weight: int = 1) -> None: ...
5262

5363
class StringTable:

0 commit comments

Comments
 (0)