pub struct Learned { /* private fields */ }Expand description
What warm runners learn from the history: when each repository’s jobs come, and how many jobs its workflows’ runs queue.
Implementations§
Source§impl Learned
impl Learned
Sourcepub fn new(seen: &[Seen], now: u64) -> Learned
pub fn new(seen: &[Seen], now: u64) -> Learned
Learns from the jobs queued in the LOOKBACK before now (ms).
Sourcepub fn absorb(&mut self, older: &Learned)
pub fn absorb(&mut self, older: &Learned)
Keeps the last jobs older noted that this one has not read yet.
Sourcepub fn note(&mut self, repository: &str, at: u64)
pub fn note(&mut self, repository: &str, at: u64)
Notes a job of repository queued or taken at at (ms).
Trait Implementations§
impl Eq for Learned
impl StructuralPartialEq for Learned
Auto Trait Implementations§
impl Freeze for Learned
impl RefUnwindSafe for Learned
impl Send for Learned
impl Sync for Learned
impl Unpin for Learned
impl UnsafeUnpin for Learned
impl UnwindSafe for Learned
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.