Initial Seg Data Server Net platform
This commit is contained in:
18
backend/tests/test_system_service.py
Normal file
18
backend/tests/test_system_service.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from app.modules.system.service import parse_nvidia_smi_csv
|
||||
|
||||
|
||||
def test_parse_nvidia_smi_csv():
|
||||
output = "0, NVIDIA GeForce RTX 4090, 24564, 15, 24069, 0, 37\n"
|
||||
gpus = parse_nvidia_smi_csv(output)
|
||||
assert gpus == [
|
||||
{
|
||||
"index": 0,
|
||||
"name": "NVIDIA GeForce RTX 4090",
|
||||
"memory_total_mb": 24564,
|
||||
"memory_used_mb": 15,
|
||||
"memory_free_mb": 24069,
|
||||
"utilization_gpu_percent": 0,
|
||||
"temperature_c": 37,
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user