[object Object]

← back to Exo

add metrics: gpu_usage, temp, sys_power, pcpu_usage, ecpu_usage, ane_…

a2b4093d25f790486b1f1d4a393767351f11596f · 2025-07-28 23:02:33 +0100 · Alex Cheema

Files touched

Diff

commit a2b4093d25f790486b1f1d4a393767351f11596f
Author: Alex Cheema <41707476+AlexCheema@users.noreply.github.com>
Date:   Mon Jul 28 23:02:33 2025 +0100

    add metrics: gpu_usage, temp, sys_power, pcpu_usage, ecpu_usage, ane_…
---
 shared/types/profiling.py | 7 +++++++
 worker/utils/profile.py   | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/shared/types/profiling.py b/shared/types/profiling.py
index 2986d45f..304ac434 100644
--- a/shared/types/profiling.py
+++ b/shared/types/profiling.py
@@ -11,6 +11,13 @@ class MemoryPerformanceProfile(BaseModel):
 class SystemPerformanceProfile(BaseModel):
     flops_fp16: float
 
+    gpu_usage: float = 0.0
+    temp: float = 0.0
+    sys_power: float = 0.0
+    pcpu_usage: float = 0.0
+    ecpu_usage: float = 0.0
+    ane_power: float = 0.0
+
 
 class NetworkInterfaceInfo(BaseModel):
     name: str
diff --git a/worker/utils/profile.py b/worker/utils/profile.py
index 77820550..702a84ff 100644
--- a/worker/utils/profile.py
+++ b/worker/utils/profile.py
@@ -88,6 +88,12 @@ async def start_polling_node_metrics(
                     ),
                     system=SystemPerformanceProfile(
                         flops_fp16=0,
+                        gpu_usage=metrics.gpu_usage[1] if metrics.gpu_usage is not None else 0,
+                        temp=metrics.temp.gpu_temp_avg if metrics.temp is not None and metrics.temp.gpu_temp_avg is not None else 0,
+                        sys_power=metrics.sys_power if metrics.sys_power is not None else 0,
+                        pcpu_usage=metrics.pcpu_usage[1] if metrics.pcpu_usage is not None else 0,
+                        ecpu_usage=metrics.ecpu_usage[1] if metrics.ecpu_usage is not None else 0,
+                        ane_power=metrics.ane_power if metrics.ane_power is not None else 0,
                     ),
                 )
             )

← 12566865 better profiling  ·  back to Exo  ·  Reinstate dashboard 3f192f20 →