mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Fix divide by zero
This commit is contained in:
parent
e203318ca6
commit
1e6ee1a636
@ -318,6 +318,7 @@ def get_intel_gpu_stats() -> dict[str, str]:
|
||||
if video_frame is not None:
|
||||
video[key].append(float(video_frame))
|
||||
|
||||
if render["global"]:
|
||||
results["gpu"] = (
|
||||
f"{round(((sum(render['global']) / len(render['global'])) + (sum(video['global']) / len(video['global']))) / 2, 2)}%"
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user