diff --git a/crates/alloc/src/stats.rs b/crates/alloc/src/stats.rs index 4710c68..a502e2d 100644 --- a/crates/alloc/src/stats.rs +++ b/crates/alloc/src/stats.rs @@ -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(())