On this page
resource.struct_rusage
Prev: resource.setrlimit | Up: resource
Rel: resource.error, resource.getpagesize, resource.getrlimit, resource.getrusage
Ref: docs.python.org โ resource.struct_rusage
Tags: #public #python3 #stdlib #resource
Import
import resource
from resource import struct_rusage
Signature & Overview
resource.struct_rusage(iterable=(), /)
struct_rusage: Result from getrusage.
Methods & Attributes
struct_rusage.count(self, value, /)โ Return number of occurrences of value.struct_rusage.index(self, value, start=0, stop=9223372036854775807, /)โ Return first index of value.
Usage
import resource
assert isinstance(resource.getrusage(resource.RUSAGE_SELF), resource.struct_rusage)
Gotchas
- Key fields:
ru_utime,ru_stime,ru_maxrss,ru_minflt,ru_majflt.
REPL Inspect
from resource import struct_rusage
help(struct_rusage)
Linked from
Related notes
- tuts/python3/stdlib_module/resource/setrlimit Linked here; links to this page; shared tags: #resource, #stdlib
- tuts/python3/stdlib_module/resource Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/resource/error Linked here; shared tags: #resource, #stdlib
- tuts/python3/stdlib_module/resource/getpagesize Linked here; shared tags: #resource, #stdlib
- tuts/python3/stdlib_module/resource/getrlimit Linked here; shared tags: #resource, #stdlib
- tuts/python3/stdlib_module/resource/getrusage Linked here; shared tags: #resource, #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib