From 345abde7415eaa6b3ae35262732dd4bfd49fa4bf Mon Sep 17 00:00:00 2001 From: prplV Date: Tue, 3 Dec 2024 13:09:02 +0300 Subject: [PATCH] no metrics warnings --- src/utils/metrics.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/metrics.rs b/src/utils/metrics.rs index 923106a..0648a3e 100644 --- a/src/utils/metrics.rs +++ b/src/utils/metrics.rs @@ -27,6 +27,7 @@ use crate::utils::get_container_id; /// /// *depends on* : - /// +#[allow(dead_code)] pub async fn init_metrics_grubber() { let mut system = System::new(); // let mut buffer: Vec = vec![]; @@ -39,6 +40,8 @@ pub async fn init_metrics_grubber() { // let _ = capture_packets(shared_buf.clone()).await; } +#[allow(dead_code)] +#[allow(unused_variables)] async fn gather_metrics(proc: Arc) { } @@ -92,6 +95,7 @@ async fn gather_metrics(proc: Arc) { /// /// *depends on* : `TrackingProcess` /// +#[allow(dead_code)] async fn get_all_container_metrics(sys: Arc, prcs: Arc>) -> ContainerMetrics { let metrics = join!( get_cpu_metrics_container(sys.clone()), @@ -119,6 +123,7 @@ async fn get_all_container_metrics(sys: Arc, prcs: Arc) -> f32 { sys.global_cpu_usage() } @@ -136,6 +141,7 @@ async fn get_cpu_metrics_container(sys: Arc) -> f32 { /// /// *depends on* : - /// +#[allow(dead_code)] async fn get_ram_metrics_container(sys: Arc) -> f32 { (sys.used_memory() / sys.total_memory()) as f32 * 100.0 } @@ -156,6 +162,7 @@ async fn get_ram_metrics_container(sys: Arc) -> f32 { /// /// *depends on* : `TrackingProcess` /// +#[allow(dead_code)] async fn get_subsystems(prcs: Arc>) -> Vec { prcs.iter().map(|process| process.name.clone()).collect() } @@ -173,6 +180,7 @@ async fn get_subsystems(prcs: Arc>) -> Vec { /// /// *depends on* : - /// +#[allow(dead_code)] async fn get_all_metrics_process(proc: Arc, sys: Arc) -> ProcessMetrics { let metrics = join!( get_cpu_metrics_process(proc.clone()),