Skip to content

Commit

Permalink
fix: update metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
heilhead committed Sep 2, 2024
1 parent 985ac78 commit eb5a397
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/alloc/src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ pub fn update_jemalloc_metrics() -> Result<(), Error> {
// corresponding size class.
gauge("jemalloc_memory_bin_nrequests", bin_stats.nrequests);

gauge(
"jemalloc_memory_bin_nactive",
bin_stats.nmalloc - bin_stats.ndalloc,
);
let active = bin_stats.nmalloc - bin_stats.ndalloc;

gauge("jemalloc_memory_bin_nactive", active);
gauge("jemalloc_memory_bin_nactive_size", active * bin_const.size);
}

Ok(())
Expand Down

0 comments on commit eb5a397

Please sign in to comment.