| 1 |
import sys |
| 2 |
from _typeshed import structseq |
| 3 |
from typing import Final, final |
| 4 |
|
| 5 |
if sys.platform != "win32": |
| 6 |
|
| 7 |
RLIMIT_AS: Final[int] |
| 8 |
RLIMIT_CORE: Final[int] |
| 9 |
RLIMIT_CPU: Final[int] |
| 10 |
RLIMIT_DATA: Final[int] |
| 11 |
RLIMIT_FSIZE: Final[int] |
| 12 |
RLIMIT_MEMLOCK: Final[int] |
| 13 |
RLIMIT_NOFILE: Final[int] |
| 14 |
RLIMIT_NPROC: Final[int] |
| 15 |
RLIMIT_RSS: Final[int] |
| 16 |
RLIMIT_STACK: Final[int] |
| 17 |
RLIM_INFINITY: Final[int] |
| 18 |
RUSAGE_CHILDREN: Final[int] |
| 19 |
RUSAGE_SELF: Final[int] |
| 20 |
if sys.platform == "linux": |
| 21 |
RLIMIT_MSGQUEUE: Final[int] |
| 22 |
RLIMIT_NICE: Final[int] |
| 23 |
RLIMIT_OFILE: Final[int] |
| 24 |
RLIMIT_RTPRIO: Final[int] |
| 25 |
RLIMIT_RTTIME: Final[int] |
| 26 |
RLIMIT_SIGPENDING: Final[int] |
| 27 |
RUSAGE_THREAD: Final[int] |
| 28 |
|
| 29 |
@final |
| 30 |
class struct_rusage( |
| 31 |
structseq[float], tuple[float, float, int, int, int, int, int, int, int, int, int, int, int, int, int, int] |
| 32 |
): |
| 33 |
if sys.version_info >= (3, 10): |
| 34 |
__match_args__: Final = ( |
| 35 |
"ru_utime", |
| 36 |
"ru_stime", |
| 37 |
"ru_maxrss", |
| 38 |
"ru_ixrss", |
| 39 |
"ru_idrss", |
| 40 |
"ru_isrss", |
| 41 |
"ru_minflt", |
| 42 |
"ru_majflt", |
| 43 |
"ru_nswap", |
| 44 |
"ru_inblock", |
| 45 |
"ru_oublock", |
| 46 |
"ru_msgsnd", |
| 47 |
"ru_msgrcv", |
| 48 |
"ru_nsignals", |
| 49 |
"ru_nvcsw", |
| 50 |
"ru_nivcsw", |
| 51 |
) |
| 52 |
|
| 53 |
@property |
| 54 |
def ru_utime(self) -> float: ... |
| 55 |
@property |
| 56 |
def ru_stime(self) -> float: ... |
| 57 |
@property |
| 58 |
def ru_maxrss(self) -> int: ... |
| 59 |
@property |
| 60 |
def ru_ixrss(self) -> int: ... |
| 61 |
@property |
| 62 |
def ru_idrss(self) -> int: ... |
| 63 |
@property |
| 64 |
def ru_isrss(self) -> int: ... |
| 65 |
@property |
| 66 |
def ru_minflt(self) -> int: ... |
| 67 |
@property |
| 68 |
def ru_majflt(self) -> int: ... |
| 69 |
@property |
| 70 |
def ru_nswap(self) -> int: ... |
| 71 |
@property |
| 72 |
def ru_inblock(self) -> int: ... |
| 73 |
@property |
| 74 |
def ru_oublock(self) -> int: ... |
| 75 |
@property |
| 76 |
def ru_msgsnd(self) -> int: ... |
| 77 |
@property |
| 78 |
def ru_msgrcv(self) -> int: ... |
| 79 |
@property |
| 80 |
def ru_nsignals(self) -> int: ... |
| 81 |
@property |
| 82 |
def ru_nvcsw(self) -> int: ... |
| 83 |
@property |
| 84 |
def ru_nivcsw(self) -> int: ... |
| 85 |
|
| 86 |
def getpagesize() -> int: ... |
| 87 |
def getrlimit(resource: int, /) -> tuple[int, int]: ... |
| 88 |
def getrusage(who: int, /) -> struct_rusage: ... |
| 89 |
def setrlimit(resource: int, limits: tuple[int, int], /) -> None: ... |
| 90 |
if sys.platform == "linux": |
| 91 |
if sys.version_info >= (3, 12): |
| 92 |
def prlimit(pid: int, resource: int, limits: tuple[int, int] | None = None, /) -> tuple[int, int]: ... |
| 93 |
else: |
| 94 |
def prlimit(pid: int, resource: int, limits: tuple[int, int] = ..., /) -> tuple[int, int]: ... |
| 95 |
error = OSError |