agent: update AGENT_THREADS metrics value

Fixes: #8369

Signed-off-by: gaohuatao <gaohuatao@bytedance.com>
This commit is contained in:
gaohuatao 2023-11-03 16:24:21 +08:00
parent 2b937400fe
commit 78df1bb851

View File

@ -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));