Module resource

Module resource 

Source

Structs§

ResourceStatImpl
A implementation of ResourceStat trait.

Traits§

ResourceStat
A trait for getting resource statistics.

Functions§

get_total_cpu_cores
Get the total CPU cores. The result will be rounded to the nearest integer. For example, if the total CPU is 1.5 cores(1500 millicores), the result will be 2.
get_total_cpu_millicores
Get the total CPU in millicores. If the CPU limit is unset, it will return the total CPU cores from host system.
get_total_memory_bytes
Get the total memory in bytes. If the memory limit is unset, it will return the total memory from host system. If the system is not supported to get the total host memory, it will return 0.
get_total_memory_readable
Get the total memory in readable size.

Type Aliases§

ResourceStatRef
A reference to a ResourceStat implementation.