massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 3.4 / tracemalloc.pyi
1 # Stubs for tracemalloc (Python 3.4+)\r
2 \r
3 import sys\r
4 from typing import List, Optional, Sequence, Tuple, Union, overload\r
5 \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
15 \r
16 if sys.version_info >= (3, 6):\r
17     class DomainFilter:\r
18         inclusive = ...  # type: bool\r
19         domain = ...  # type: int\r
20         def __init__(self, inclusive: bool, domain: int) -> None: ...\r
21 \r
22 class Filter:\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
30 \r
31 class Frame:\r
32     filename = ...  # type: str\r
33     lineno = ...  # type: int\r
34 \r
35 class Snapshot:\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
40     else:\r
41         def filter_traces(self, filters: Sequence[Filter]) -> Snapshot: ...\r
42     @classmethod\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
47 \r
48 class Statistic:\r
49     count = ...  # type: int\r
50     size = ...  # type: int\r
51     traceback = ...  # type: Traceback\r
52 \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
59 \r
60 class Trace:\r
61     size = ...  # type: int\r
62     traceback = ...  # type: Traceback\r
63 \r
64 class Traceback(Sequence[Frame]):\r
65     def format(self, limit: Optional[int] = ...) -> List[str]: ...\r
66     @overload\r
67     def __getitem__(self, i: int) -> Frame: ...\r
68     @overload\r
69     def __getitem__(self, s: slice) -> Sequence[Frame]: ...\r
70     def __len__(self) -> int: ...\r