Format: application/octet-stream
1 import sys
2 from _typeshed import AnyPath
3 from cProfile import Profile as _cProfile
4 from profile import Profile
5 from typing import IO, Any, Dict, Iterable, List, Optional, Text, Tuple, TypeVar, Union, overload
6
7 _Selector = Union[str, float, int]
8 _T = TypeVar("_T", bound=Stats)
9
10 if sys.version_info >= (3, 7):
11 from enum import Enum
12 class SortKey(str, Enum):
13 CALLS: str
14 CUMULATIVE: str
15 FILENAME: str
16 LINE: str
17 NAME: str
18 NFL: str
19 PCALLS: str
20 STDNAME: str
21 TIME: str
22
23 class Stats:
24 sort_arg_dict_default: Dict[str, Tuple[Any, str]]
25 def __init__(
26 self: _T,
27 __arg: Union[None, str, Text, Profile, _cProfile] = ...,
28 *args: Union[None, str, Text, Profile, _cProfile, _T],
29 stream: Optional[IO[Any]] = ...,
30 ) -> None: ...
31 def init(self, arg: Union[None, str, Text, Profile, _cProfile]) -> None: ...
32 def load_stats(self, arg: Union[None, str, Text, Profile, _cProfile]) -> None: ...
33 def get_top_level_stats(self) -> None: ...
34 def add(self: _T, *arg_list: Union[None, str, Text, Profile, _cProfile, _T]) -> _T: ...
35 def dump_stats(self, filename: AnyPath) -> None: ...
36 def get_sort_arg_defs(self) -> Dict[str, Tuple[Tuple[Tuple[int, int], ...], str]]: ...
37 @overload
38 def sort_stats(self: _T, field: int) -> _T: ...
39 @overload
40 def sort_stats(self: _T, *field: str) -> _T: ...
41 def reverse_order(self: _T) -> _T: ...
42 def strip_dirs(self: _T) -> _T: ...
43 def calc_callees(self) -> None: ...
44 def eval_print_amount(self, sel: _Selector, list: List[str], msg: str) -> Tuple[List[str], str]: ...
45 def get_print_list(self, sel_list: Iterable[_Selector]) -> Tuple[int, List[str]]: ...
46 def print_stats(self: _T, *amount: _Selector) -> _T: ...
47 def print_callees(self: _T, *amount: _Selector) -> _T: ...
48 def print_callers(self: _T, *amount: _Selector) -> _T: ...
49 def print_call_heading(self, name_size: int, column_title: str) -> None: ...
50 def print_call_line(self, name_size: int, source: str, call_dict: Dict[str, Any], arrow: str = ...) -> None: ...
51 def print_title(self) -> None: ...
52 def print_line(self, func: str) -> None: ...
53