Common data types¶
Common data types
Classes:
| Name | Description |
|---|---|
MemoryUsed |
Memory data class, handles the various string formats (K, M, G postfix) for uniform processing. |
Number |
Class for capturing certain number information in the JSON output. |
PostFixUnit |
Handle postfix units (K, M, G) mostly used for frequency. |
Attributes:
| Name | Type | Description |
|---|---|---|
CPU_TIME_RE |
Regex to parse time format D-HH:MM:SS |
CPU_TIME_RE
¶
Regex to parse time format D-HH:MM:SS
MemoryUsed
¶
Memory data class, handles the various string formats (K, M, G postfix) for uniform processing. Value is stored as MiB and converted when needed.
Methods:
| Name | Description |
|---|---|
from_mb |
Create from MiB float value. |
Attributes:
| Name | Type | Description |
|---|---|---|
GB |
float
|
Get the value in GiB |
MB |
float
|
Get the value in MiB |
Source code in src/slurm_viewer/data/common_types.py
PostFixUnit
¶
PostFixUnit(value: str)
Handle postfix units (K, M, G) mostly used for frequency.