mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-03 20:02:54 +00:00
fix: correct jemalloc metrics (#6959)
The allocated and resident metrics were swapped in the set calls. This commit fixes the issue by ensuring each metric receives its corresponding value.
This commit is contained in:
@@ -71,8 +71,8 @@ impl JemallocCollector {
|
||||
let _ = self.epoch.advance().context(UpdateJemallocMetricsSnafu)?;
|
||||
let allocated = self.allocated.read().context(UpdateJemallocMetricsSnafu)?;
|
||||
let resident = self.resident.read().context(UpdateJemallocMetricsSnafu)?;
|
||||
SYS_JEMALLOC_RESIDEN.set(allocated as i64);
|
||||
SYS_JEMALLOC_ALLOCATED.set(resident as i64);
|
||||
SYS_JEMALLOC_ALLOCATED.set(allocated as i64);
|
||||
SYS_JEMALLOC_RESIDEN.set(resident as i64);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user