mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
add _lsprof module (#11159)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import _lsprof
|
||||
from _typeshed import StrOrBytesPath, Unused
|
||||
from collections.abc import Callable
|
||||
from types import CodeType
|
||||
@@ -15,13 +16,8 @@ _T = TypeVar("_T")
|
||||
_P = ParamSpec("_P")
|
||||
_Label: TypeAlias = tuple[str, int, str]
|
||||
|
||||
class Profile:
|
||||
class Profile(_lsprof.Profiler):
|
||||
stats: dict[_Label, tuple[int, int, int, int, dict[_Label, tuple[int, int, int, int]]]] # undocumented
|
||||
def __init__(
|
||||
self, timer: Callable[[], float] = ..., timeunit: float = ..., subcalls: bool = ..., builtins: bool = ...
|
||||
) -> None: ...
|
||||
def enable(self) -> None: ...
|
||||
def disable(self) -> None: ...
|
||||
def print_stats(self, sort: str | int = -1) -> None: ...
|
||||
def dump_stats(self, file: StrOrBytesPath) -> None: ...
|
||||
def create_stats(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user