pub struct DriveShares {
pub watched: u64,
pub written: u64,
pub jobs: u64,
pub slice: Option<u64>,
pub daemon: Option<u64>,
}Expand description
Whose the drive’s bytes were, over the stretches the daemon read the runner slice, or over all it read the drive when it never read the slice: a stretch that missed one figure leaves the others’ shares be.
Fields§
§watched: u64Seconds these were read over.
written: u64Bytes the drive wrote then.
jobs: u64Of those, the figures of the jobs that ended then.
slice: Option<u64>Of those, the runner slice’s; None without its io.stat.
daemon: Option<u64>What the daemon itself wrote then, to any disk; None where it could not read its own counters.
Implementations§
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether they have nothing to show: the drive wrote nothing over them, as on the first read after a start, so every part is 0 bytes and its percents would not add up to 100. A client draws no shares then.
Sourcepub fn parts(&self) -> Vec<DriveShare>
pub fn parts(&self) -> Vec<DriveShare>
Whose the bytes were, in the order the line says them: runner jobs’, the rest of the runner slice’s when its
io.stat was read, runnerd’s own when read, and the rest, no owner runnerd knows. Their bytes add up to the
whole; jobs that ended in the stretch may count what they wrote before it, so no share passes the whole.
Trait Implementations§
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.