@@ -3,9 +3,8 @@ from collections.abc import Callable, Sequence
33from typing import Final , TypeAlias , final
44from typing_extensions import Self
55
6- _Location : TypeAlias = int | LocationInfo | None
6+ _Location : TypeAlias = LocationInfo | None
77_Frame : TypeAlias = tuple [str , _Location , str , int | None ] | FrameInfo
8- _StackFrames : TypeAlias = Sequence [InterpreterInfo ]
98_Stats : TypeAlias = dict [str , int | float ]
109
1110PROCESS_VM_READV_SUPPORTED : Final [int ]
@@ -149,11 +148,12 @@ class GCMonitor:
149148
150149@final
151150class BinaryWriter :
152- total_samples : int
153151 def __init__ (
154152 self , filename : StrOrBytesPath , sample_interval_us : int , start_time_us : int , * , compression : int = 0
155153 ) -> None : ...
156- def write_sample (self , stack_frames : _StackFrames , timestamp_us : int ) -> None : ...
154+ @property
155+ def total_samples (self ) -> int : ...
156+ def write_sample (self , stack_frames : Sequence [InterpreterInfo ], timestamp_us : int ) -> None : ...
157157 def finalize (self ) -> None : ...
158158 def close (self ) -> None : ...
159159 def __enter__ (self ) -> Self : ...
@@ -162,9 +162,11 @@ class BinaryWriter:
162162
163163@final
164164class BinaryReader :
165- sample_count : int
166- sample_interval_us : int
167165 def __init__ (self , filename : StrOrBytesPath ) -> None : ...
166+ @property
167+ def sample_count (self ) -> int : ...
168+ @property
169+ def sample_interval_us (self ) -> int : ...
168170 def replay (self , collector : object , progress_callback : Callable [[int , int ], object ] | None = None ) -> int : ...
169171 def get_info (self ) -> dict [str , object ]: ...
170172 def get_stats (self ) -> _Stats : ...
0 commit comments