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