pub struct BandwidthHistory {
pub end_time: DateTime<Utc>,
pub interval: u32,
pub values: Vec<i64>,
}Expand description
Bandwidth history data for a time period.
Records bytes transferred over a series of fixed-length intervals. This is used for read/write history and directory request history.
§Format
The history line format is:
keyword YYYY-MM-DD HH:MM:SS (INTERVAL s) VALUE,VALUE,...§Example
use stem_rs::descriptor::extra_info::BandwidthHistory;
use chrono::Utc;
let history = BandwidthHistory {
end_time: Utc::now(),
interval: 900, // 15 minutes
values: vec![1000000, 2000000, 3000000],
};
assert_eq!(history.interval, 900);
assert_eq!(history.values.len(), 3);Fields§
§end_time: DateTime<Utc>End time of the most recent interval (UTC).
interval: u32Length of each interval in seconds (typically 900 = 15 minutes).
values: Vec<i64>Bytes transferred during each interval, oldest first.
Values can be negative in some cases due to historical bugs.
Trait Implementations§
Source§impl Clone for BandwidthHistory
impl Clone for BandwidthHistory
Source§fn clone(&self) -> BandwidthHistory
fn clone(&self) -> BandwidthHistory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BandwidthHistory
impl Debug for BandwidthHistory
Source§impl PartialEq for BandwidthHistory
impl PartialEq for BandwidthHistory
impl StructuralPartialEq for BandwidthHistory
Auto Trait Implementations§
impl Freeze for BandwidthHistory
impl RefUnwindSafe for BandwidthHistory
impl Send for BandwidthHistory
impl Sync for BandwidthHistory
impl Unpin for BandwidthHistory
impl UnwindSafe for BandwidthHistory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more