Debian Codegraph @

jedi/third_party/typeshed/stdlib/profile.pyi

raw symbols SCIP
1 from _typeshed import StrOrBytesPath
2 from collections.abc import Callable, Mapping
3 from typing import Any, TypeVar
4 from typing_extensions import ParamSpec, Self, TypeAlias
5
6 __all__ = ["run", "runctx", "Profile"]
7
8 def run(statement: str, filename: str | None = None, sort: str | int = -1) -> None: ...
9 def runctx(
10 statement: str, globals: dict[str, Any], locals: Mapping[str, Any], filename: str | None = None, sort: str | int = -1
11 ) -> None: ...
12
13 _T = TypeVar("_T")
14 _P = ParamSpec("_P")
15 _Label: TypeAlias = tuple[str, int, str]
16
17 class Profile:
18 bias: int
19 stats: dict[_Label, tuple[int, int, int, int, dict[_Label, tuple[int, int, int, int]]]] # undocumented
20 def __init__(self, timer: Callable[[], float] | None = None, bias: int | None = None) -> None: ...
21 def set_cmd(self, cmd: str) -> None: ...
22 def simulate_call(self, name: str) -> None: ...
23 def simulate_cmd_complete(self) -> None: ...
24 def print_stats(self, sort: str | int = -1) -> None: ...
25 def dump_stats(self, file: StrOrBytesPath) -> None: ...
26 def create_stats(self) -> None: ...
27 def snapshot_stats(self) -> None: ...
28 def run(self, cmd: str) -> Self: ...
29 def runctx(self, cmd: str, globals: dict[str, Any], locals: Mapping[str, Any]) -> Self: ...
30 def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kw: _P.kwargs) -> _T: ...
31 def calibrate(self, m: int, verbose: int = 0) -> float: ...