Skip to content

Commit

Permalink
Merge pull request kata-containers#8370 from gaohuatao-1/bugfix
Browse files Browse the repository at this point in the history
agent: update AGENT_THREADS metrics value
  • Loading branch information
studychao authored Nov 10, 2023
2 parents 2b93740 + 78df1bb commit 820b578
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/agent/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 820b578

Please sign in to comment.