1 # Stubs for tracemalloc (Python 3.4+)
\r
4 from typing import List, Optional, Sequence, Tuple, Union, overload
\r
6 def clear_traces() -> None: ...
\r
7 def get_object_traceback(obj: object) -> Optional[Traceback]: ...
\r
8 def get_traceback_limit() -> int: ...
\r
9 def get_traced_memory() -> Tuple[int, int]: ...
\r
10 def get_tracemalloc_memory() -> int: ...
\r
11 def is_tracing() -> bool: ...
\r
12 def start(nframe: int = ...) -> None: ...
\r
13 def stop() -> None: ...
\r
14 def take_snapshot() -> Snapshot: ...
\r
16 if sys.version_info >= (3, 6):
\r
18 inclusive = ... # type: bool
\r
19 domain = ... # type: int
\r
20 def __init__(self, inclusive: bool, domain: int) -> None: ...
\r
23 if sys.version_info >= (3, 6):
\r
24 domain = ... # type: Optional[int]
\r
25 inclusive = ... # type: bool
\r
26 lineno = ... # type: Optional[int]
\r
27 filename_pattern = ... # type: str
\r
28 all_frames = ... # type: bool
\r
29 def __init__(self, inclusive: bool, filename_pattern: str, lineno: Optional[int] = ..., all_frames: bool = ..., domain: Optional[int] = ...) -> None: ...
\r
32 filename = ... # type: str
\r
33 lineno = ... # type: int
\r
36 def compare_to(self, old_snapshot: Snapshot, key_type: str, cumulative: bool = ...) -> List[StatisticDiff]: ...
\r
37 def dump(self, filename: str) -> None: ...
\r
38 if sys.version_info >= (3, 6):
\r
39 def filter_traces(self, filters: Sequence[Union[DomainFilter, Filter]]) -> Snapshot: ...
\r
41 def filter_traces(self, filters: Sequence[Filter]) -> Snapshot: ...
\r
43 def load(cls, filename: str) -> Snapshot: ...
\r
44 def statistics(self, key_type: str, cumulative: bool = ...) -> List[Statistic]: ...
\r
45 traceback_limit = ... # type: int
\r
46 traces = ... # type: Sequence[Trace]
\r
49 count = ... # type: int
\r
50 size = ... # type: int
\r
51 traceback = ... # type: Traceback
\r
53 class StatisticDiff:
\r
54 count = ... # type: int
\r
55 count_diff = ... # type: int
\r
56 size = ... # type: int
\r
57 size_diff = ... # type: int
\r
58 traceback = ... # type: Traceback
\r
61 size = ... # type: int
\r
62 traceback = ... # type: Traceback
\r
64 class Traceback(Sequence[Frame]):
\r
65 def format(self, limit: Optional[int] = ...) -> List[str]: ...
\r
67 def __getitem__(self, i: int) -> Frame: ...
\r
69 def __getitem__(self, s: slice) -> Sequence[Frame]: ...
\r
70 def __len__(self) -> int: ...
\r