From 78df1bb8511c9f1981f74d03f7e6993ed9541204 Mon Sep 17 00:00:00 2001 From: gaohuatao Date: Fri, 3 Nov 2023 16:24:21 +0800 Subject: [PATCH] agent: update AGENT_THREADS metrics value Fixes: #8369 Signed-off-by: gaohuatao --- src/agent/src/metrics.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/agent/src/metrics.rs b/src/agent/src/metrics.rs index d7fc4d12bd..61a460c695 100644 --- a/src/agent/src/metrics.rs +++ b/src/agent/src/metrics.rs @@ -145,6 +145,9 @@ fn update_agent_metrics() -> Result<()> { let tps = procfs::ticks_per_second()?; + // process agent threads number + AGENT_THREADS.set(me.stat.num_threads as f64); + // process total time AGENT_TOTAL_TIME.set((me.stat.utime + me.stat.stime) as f64 / (tps as f64));