diff --git a/proxmox-rrd/examples/prrd.rs b/proxmox-rrd/examples/prrd.rs index 5825f296..c7d29376 100644 --- a/proxmox-rrd/examples/prrd.rs +++ b/proxmox-rrd/examples/prrd.rs @@ -124,10 +124,10 @@ pub fn update_rrd(path: String, time: Option, value: f64) -> Result<(), Err type: CF, }, resolution: { - description: "Time resulution", + description: "Time resolution", }, start: { - description: "Start time. If not sepecified, we simply extract 10 data points.", + description: "Start time. If not specified, we simply extract 10 data points.", optional: true, }, end: { @@ -292,11 +292,11 @@ pub fn resize_rrd(path: String, rra_index: usize, slots: i64) -> Result<(), Erro let new_slots = (rra.data.len() as i64) + slots; if new_slots < 1 { - bail!("numer of new slots is too small ('{}' < 1)", new_slots); + bail!("number of new slots is too small ('{}' < 1)", new_slots); } if new_slots > 1024 * 1024 { - bail!("numer of new slots is too big ('{}' > 1M)", new_slots); + bail!("number of new slots is too big ('{}' > 1M)", new_slots); } let rra_end = rra.slot_end_time(rrd.source.last_update as u64); diff --git a/proxmox-rrd/src/cache.rs b/proxmox-rrd/src/cache.rs index 8b004fd7..254010f3 100644 --- a/proxmox-rrd/src/cache.rs +++ b/proxmox-rrd/src/cache.rs @@ -102,7 +102,7 @@ impl RRDCache { /// * cf=average,r=7*86400,n=570 => 10years /// * cf=maximum,r=7*86400,n=570 => 10year /// - /// The resultion data file size is about 80KB. + /// The resulting data file size is about 80KB. pub fn create_proxmox_backup_default_rrd(dst: DST) -> RRD { let rra_list = vec![ // 1 min * 1440 => 1 day @@ -207,7 +207,7 @@ impl RRDCache { /// Extract data from cached RRD /// - /// `start`: Start time. If not sepecified, we simply extract 10 data points. + /// `start`: Start time. If not specified, we simply extract 10 data points. /// /// `end`: End time. Default is to use the current time. pub fn extract_cached_data( diff --git a/proxmox-rrd/src/rrd.rs b/proxmox-rrd/src/rrd.rs index cd1016e0..0b8ac460 100644 --- a/proxmox-rrd/src/rrd.rs +++ b/proxmox-rrd/src/rrd.rs @@ -147,7 +147,7 @@ impl DataSource { // we update last_value anyways, so that we can compute the diff // next time. self.last_value = value; - bail!("conter overflow/reset detected"); + bail!("counter overflow/reset detected"); } else { value - self.last_value }; diff --git a/proxmox-rrd/src/rrd_v1.rs b/proxmox-rrd/src/rrd_v1.rs index a1e7bf8e..2f4a25f8 100644 --- a/proxmox-rrd/src/rrd_v1.rs +++ b/proxmox-rrd/src/rrd_v1.rs @@ -13,7 +13,7 @@ pub const PROXMOX_RRD_MAGIC_1_0: [u8; 8] = [206, 46, 26, 212, 172, 158, 5, 186]; use crate::rrd::{DataSource, CF, DST, RRA, RRD}; bitflags! { - /// Flags to specify the data soure type and consolidation function + /// Flags to specify the data source type and consolidation function pub struct RRAFlags: u64 { // Data Source Types const DST_GAUGE = 1; @@ -34,9 +34,9 @@ bitflags! { /// RRD files. #[repr(C)] pub struct RRAv1 { - /// Defined the data soure type and consolidation function + /// Defined the data source type and consolidation function pub flags: RRAFlags, - /// Resulution (seconds) + /// Resolution (seconds) pub resolution: u64, /// Last update time (epoch) pub last_update: f64, @@ -213,7 +213,7 @@ impl RRDv1 { let (start, reso, data) = self.hour_max.extract_data(); day_max.insert_data(start, reso, data)?; - // compute montly average (merge old self.month_avg, + // compute monthly average (merge old self.month_avg, // self.week_avg and self.day_avg) let mut month_avg = RRA::new(CF::Average, 30 * 60, 1440); @@ -228,7 +228,7 @@ impl RRDv1 { let (start, reso, data) = self.day_avg.extract_data(); month_avg.insert_data(start, reso, data)?; - // compute montly maximum (merge old self.month_max, + // compute monthly maximum (merge old self.month_max, // self.week_max and self.day_max) let mut month_max = RRA::new(CF::Maximum, 30 * 60, 1440);