koder aka kdanilov | 22d134e | 2016-11-08 11:33:19 +0200 | [diff] [blame] | 1 | from typing import NamedTuple, TypeVar, Callable, Any, Optional, List, Iterable, Dict, Tuple |
| 2 | |
koder aka kdanilov | 22d134e | 2016-11-08 11:33:19 +0200 | [diff] [blame] | 3 | Pid = TypeVar('Pid', str) |
| 4 | AnyFunc = TypeVar('AnyFunc', Callable[..., Any]) |
| 5 | PrefixList = Optional[List[str]] |
koder aka kdanilov | 7022706 | 2016-11-26 23:23:21 +0200 | [diff] [blame] | 6 | SensorDict = Dict[str, int] |
koder aka kdanilov | 22d134e | 2016-11-08 11:33:19 +0200 | [diff] [blame] | 7 | |
| 8 | def provides(name: str) -> Callable[[AnyFunc], AnyFunc]: ... |
koder aka kdanilov | 7022706 | 2016-11-26 23:23:21 +0200 | [diff] [blame] | 9 | def is_dev_accepted(name: str, disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> bool: ... |
koder aka kdanilov | 22d134e | 2016-11-08 11:33:19 +0200 | [diff] [blame] | 10 | def get_pid_name(pid: Pid) -> str: ... |
koder aka kdanilov | 22d134e | 2016-11-08 11:33:19 +0200 | [diff] [blame] | 11 | def pid_stat(pid: Pid) -> float: ... |
| 12 | def get_mem_stats(pid : Pid) -> Tuple[int, int]: ... |
koder aka kdanilov | 7022706 | 2016-11-26 23:23:21 +0200 | [diff] [blame] | 13 | def get_ram_size() -> int: ... |
koder aka kdanilov | 22d134e | 2016-11-08 11:33:19 +0200 | [diff] [blame] | 14 | |
koder aka kdanilov | 7022706 | 2016-11-26 23:23:21 +0200 | [diff] [blame] | 15 | def io_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> int: ... |
| 16 | def net_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> int: ... |
| 17 | def pscpu_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> int: ... |
| 18 | def psram_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> int: ... |
| 19 | def syscpu_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> int: ... |
| 20 | def sysram_stat(disallowed_prefixes: PrefixList, allowed_prefixes: PrefixList) -> int: ... |
| 21 | |
| 22 | |