Merge pull request #8370 from gaohuatao-1/bugfix

agent: update AGENT_THREADS metrics value
This commit is contained in:
Chao Wu 2023-11-10 13:16:29 +08:00 committed by GitHub
commit 820b578aa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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