Remove all unused code and fix build warnings

- Remove unused struct fields: tier, config_name, last_collection_time
- Remove unused structs: PerformanceMetrics, PerfMonitor
- Remove unused methods: get_performance_metrics, get_collector_names, get_stats
- Remove unused utility functions and system helpers
- Remove unused config fields from CPU and Memory collectors
- Keep config fields that are actually used (DiskCollector, etc.)
- Remove unused proxy_pass_url variable and assignments
- Fix duplicate hostname variable declaration
- Achieve zero build warnings without functionality changes
This commit is contained in:
2025-10-20 20:20:47 +02:00
parent 049ac53629
commit eb268922bd
12 changed files with 4 additions and 179 deletions

View File

@@ -9,7 +9,7 @@ use std::process::Command;
use std::time::Instant;
use tracing::debug;
use super::{Collector, CollectorError, PerformanceMetrics};
use super::{Collector, CollectorError};
/// Information about a mounted disk
#[derive(Debug, Clone)]
@@ -22,7 +22,6 @@ struct MountedDisk {
used: String, // e.g., "45G"
available: String, // e.g., "75G"
usage_percent: f32, // e.g., 38.5
config_name: Option<String>, // Name from config if UUID-based
}
/// Disk usage collector for monitoring filesystem sizes
@@ -117,7 +116,6 @@ impl DiskCollector {
used,
available,
usage_percent: usage_percent as f32,
config_name: Some(fs_config.name.clone()),
});
debug!(
@@ -611,7 +609,4 @@ impl Collector for DiskCollector {
Ok(metrics)
}
fn get_performance_metrics(&self) -> Option<PerformanceMetrics> {
None // Performance tracking handled by cache system
}
}