Skip to content

Commit

Permalink
Added sending SWAP total and used amounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Macronic committed Aug 26, 2024
1 parent 4e5b275 commit 17cb20c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ impl SystemMetricsCollector {
"system_memory_used": used_memory,
"system_memory_available": system.available_memory(),
"system_memory_utilization": memory_utilization,
"system_memory_swap_total": system.total_swap(),
"system_memory_swap_used": system.used_swap(),
"system_cpu_utilization": cpu_usage,
"system_disk_io": d_stats,
});
Expand Down Expand Up @@ -99,6 +101,8 @@ mod tests {
assert!(attributes["system_memory_used"].is_number());
assert!(attributes["system_memory_available"].is_number());
assert!(attributes["system_memory_utilization"].is_number());
assert!(attributes["system_memory_swap_total"].is_number());
assert!(attributes["system_memory_swap_used"].is_number());
assert!(attributes["system_cpu_utilization"].is_number());
assert!(attributes["system_disk_io"].is_object());
}
Expand Down

0 comments on commit 17cb20c

Please sign in to comment.