diff --git a/src/exporters/json.rs b/src/exporters/json.rs index 796584dc..97fbe03e 100644 --- a/src/exporters/json.rs +++ b/src/exporters/json.rs @@ -284,7 +284,7 @@ impl JsonExporter { let metric_disk_name = m.attributes.get("disk_name").unwrap(); if let Some(disk) = res.iter_mut().find(|x| metric_disk_name == &x.disk_name) { info!("editing disk"); - disk.disk_name = metric_disk_name.clone(); + disk.disk_name.clone_from(metric_disk_name); if m.name == "scaph_host_disk_available_bytes" { disk.disk_available_bytes = m.metric_value.to_string(); } else if m.name == "scaph_host_disk_total_bytes" { diff --git a/src/exporters/mod.rs b/src/exporters/mod.rs index 5b3d750c..e8436d82 100644 --- a/src/exporters/mod.rs +++ b/src/exporters/mod.rs @@ -131,7 +131,7 @@ pub struct MetricGenerator { /// Tells MetricGenerator if it has to watch for containers. #[cfg(feature = "containers")] watch_containers: bool, - /// + /// Last time, containers state has been checked. #[cfg(feature = "containers")] containers_last_check: String, /// `containers` contains the containers descriptions when --containers is true @@ -155,7 +155,7 @@ pub struct MetricGenerator { /// Kubernetes pods #[cfg(feature = "containers")] pods: Vec, - /// + /// Last time pods state has been checked. #[cfg(feature = "containers")] pods_last_check: String, } diff --git a/src/sensors/mod.rs b/src/sensors/mod.rs index dc792a34..8d90b682 100644 --- a/src/sensors/mod.rs +++ b/src/sensors/mod.rs @@ -977,7 +977,7 @@ pub struct CPUSocket { pub cpu_cores: Vec, /// Usage statistics records stored for this socket. pub stat_buffer: Vec, - /// + /// Sensor-specific data that has been stored at the topology generation step. #[allow(dead_code)] pub sensor_data: HashMap, } @@ -1351,7 +1351,7 @@ pub struct Domain { pub record_buffer: Vec, /// Maximum size of record_buffer, in kilobytes pub buffer_max_kbytes: u16, - /// + /// Sensor-specific data that has been stored at the topology generation step. #[allow(dead_code)] sensor_data: HashMap, }