fix: cpu usage (#6495)

It should be in 0~100%
This commit is contained in:
Hengfei Yang
2025-04-09 11:18:00 +08:00
committed by GitHub
parent abf47e958a
commit c3a6c8a69f
+1 -1
View File
@@ -41,7 +41,7 @@ pub struct NodeMetrics {
/// Get the node running metrics
pub fn get_node_metrics() -> NodeMetrics {
let cpu_total = get_cpu_limit();
let cpu_usage = get_cpu_usage();
let cpu_usage = get_cpu_usage() / cpu_total as f32;
let memory_total = get_memory_limit();
let memory_usage = get_memory_usage();
let tcp_conns = get_tcp_connections();