Skip to content

Commit

Permalink
Fix/simplify jemalloc metrics (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
heilhead authored Sep 2, 2024
1 parent af0464e commit 695b12f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/alloc/src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ pub fn update_jemalloc_metrics() -> Result<(), Error> {
// Cumulative number of allocation requests satisfied by bin regions of the
// corresponding size class.
gauge("jemalloc_memory_bin_nrequests", bin_stats.nrequests);

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 695b12f

Please sign in to comment.