pub struct Recent { /* private fields */ }Expand description
Every job’s recent runs, with a window of size successful runs.
Implementations§
Source§impl Recent
impl Recent
Sourcepub fn new(size: u64) -> Recent
pub fn new(size: u64) -> Recent
Nothing read yet, with windows of size successful runs, at least 1.
Sourcepub fn read(
&mut self,
run: &Ran,
profile: &str,
ending: Ending,
cap: u64,
at: u64,
)
pub fn read( &mut self, run: &Ran, profile: &str, ending: Ending, cap: u64, at: u64, )
Reads a row of profile that ended at at (ms) under cap. Rows must come in the order they finished.
A run sampled with page cache counted adds no peak, and only a kill for memory says anything of its cap. A cancelled run adds its peak only when it met its cap: it got that far. A run past what it reserved is an overrun, cancelled or not. A successful run clear of its cap and of what it reserved counts toward the end of a hold; one that went past what it reserved starts the count again.
Sourcepub fn read_history(
&mut self,
history: &History,
cap_of: impl Fn(&str) -> Option<u64>,
)
pub fn read_history( &mut self, history: &History, cap_of: impl Fn(&str) -> Option<u64>, )
Reads every row of history in the order they finished, each under the cap its container had, else
cap_of(profile), else none.
Sourcepub fn job(&self, key: &Key, profile: &str) -> Option<&JobRuns>
pub fn job(&self, key: &Key, profile: &str) -> Option<&JobRuns>
The runs of key in profile, if it was seen.