refactor: Unify memory stats and create feature parity

This commit is contained in:
Jade Ellis committed 2026-11-21 15:21:56 +00:00
1 parent c6b9854c49
commit 43cf8cccdf
9 files changed
+259 -64

No files matched your search

+6 -2
View File
@@ -196,9 +196,13 @@ fn register_process(meter: &Meter) {
}
fn register_allocator(meter: &Meter) {
let Some((name, description)) = crate::alloc::metric() else {
return;
};
meter
.u64_observable_gauge("continuwuity.jemalloc.memory")
.with_description("jemalloc memory statistics, when built with jemalloc_stats")
.u64_observable_gauge(name)
.with_description(description)
.with_unit("By")
.with_callback(|observer| {
for (kind, bytes) in crate::alloc::memory_usage_stats().into_iter().flatten() {