tree-wide: fix various typos
found with codespell Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
10f56e9358
commit
109902fbf0
@ -124,10 +124,10 @@ pub fn update_rrd(path: String, time: Option<u64>, 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);
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user