mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Fix test and output
This commit is contained in:
parent
f1607b301e
commit
c0818bcd80
@ -35,11 +35,11 @@ class TestGpuStats(unittest.TestCase):
|
||||
@patch("subprocess.run")
|
||||
def test_intel_gpu_stats(self, sp):
|
||||
process = MagicMock()
|
||||
process.returncode = 0
|
||||
process.returncode = 124
|
||||
process.stdout = self.intel_results
|
||||
sp.return_value = process
|
||||
intel_stats = get_intel_gpu_stats()
|
||||
assert intel_stats == {
|
||||
"gpu": "10.73 %",
|
||||
"gpu": "1.34 %",
|
||||
"mem": "- %",
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ def get_intel_gpu_stats() -> dict[str, str]:
|
||||
else:
|
||||
video_avg = 1
|
||||
|
||||
results["gpu"] = round((video_avg + render_avg) / 2, 2)
|
||||
results["gpu"] = f"{round((video_avg + render_avg) / 2, 2)} %"
|
||||
results["mem"] = "- %"
|
||||
return results
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user