too much changes, idek anymore

This commit is contained in:
nnhphong
2025-12-10 15:36:51 -05:00
parent bfb2812402
commit 799adf9877
12 changed files with 685 additions and 35 deletions

View File

@@ -1 +1,17 @@
// Physical server health statistics, used for certain load balancing algorithms
#[derive(Debug, Default)]
pub struct ServerMetrics {
pub cpu: f64,
pub mem: f64,
pub net: f64,
pub io: f64,
}
impl ServerMetrics {
pub fn update(&mut self, cpu: f64, mem: f64, net: f64, io: f64) {
self.cpu = cpu;
self.mem = mem;
self.net = net;
self.io = io;
}
}