report swap mem as bytes like other metrics (#24455)
This commit is contained in:
parent
4fdf966393
commit
d9d0dad258
|
@ -294,13 +294,13 @@ impl SystemMonitorService {
|
|||
}
|
||||
|
||||
fn report_mem_stats() {
|
||||
// get mem info (in kb)
|
||||
if let Ok(info) = sys_info::mem_info() {
|
||||
// stats are returned in kb.
|
||||
const KB: u64 = 1_024;
|
||||
datapoint_info!(
|
||||
"memory-stats",
|
||||
("total", info.total * KB, i64),
|
||||
("swap_total", info.swap_total, i64),
|
||||
("swap_total", info.swap_total * KB, i64),
|
||||
(
|
||||
"free_percent",
|
||||
Self::calc_percent(info.free, info.total),
|
||||
|
|
Loading…
Reference in New Issue