pub struct SlotTimeline {
pub since: u64,
pub until: u64,
pub lanes: Vec<Lane>,
pub unassigned: Vec<TimelineBar>,
pub observed: Vec<Span>,
pub history_from: u64,
pub cut_before: Option<u64>,
}Expand description
GET /v1/timeline: what each slot ran over a window.
Fields§
§since: u64The window’s start.
until: u64The window’s end.
lanes: Vec<Lane>One per profile and slot a runner had in the window, by profile, then slot.
unassigned: Vec<TimelineBar>Jobs no runner of this daemon took, by when they were queued: waiting, ended before a runner took them, or run elsewhere.
observed: Vec<Span>When runnerd was watching, as its host samples show, oldest first; never before history_from.
history_from: u64Since when the history holds every job that ended: before it, pruning may have taken some.
cut_before: Option<u64>The window held more than TIMELINE_BARS_MAX bars or runners: some that began at or before this time are
left out. None when none is.
Implementations§
Source§impl SlotTimeline
impl SlotTimeline
Sourcepub const UNASSIGNED: &'static str = "no runner here"
pub const UNASSIGNED: &'static str = "no runner here"
What the lane of SlotTimeline::unassigned is named.
Sourcepub const NONE: &'static str = "no job ran or waited in this window"
pub const NONE: &'static str = "no job ran or waited in this window"
What a timeline with no bar in its window says.
Sourcepub fn cut_line(&self, now: u64) -> Option<String>
pub fn cut_line(&self, now: u64) -> Option<String>
What a timeline that left bars out says, read at now: more than 2000 jobs and runners in this window: jobs that began before 5h 00m ago are left out. None when it left none out.
Sourcepub fn assemble(rows: TimelineRows) -> SlotTimeline
pub fn assemble(rows: TimelineRows) -> SlotTimeline
Lays out what the store read: jobs into their slot’s lane or the unassigned one, the latest
TIMELINE_BARS_MAX bars and runners kept, names made safe.
Sourcepub fn of(
jobs: &[JobSummary],
window: Span,
observed: Vec<Span>,
history_from: u64,
) -> SlotTimeline
pub fn of( jobs: &[JobSummary], window: Span, observed: Vec<Span>, history_from: u64, ) -> SlotTimeline
A timeline of jobs, a whole history held in memory, over window, with runnerd watching over observed:
for the demo’s fake daemon and the fixtures. Runner containers are those of the jobs.
Trait Implementations§
Source§impl Clone for SlotTimeline
impl Clone for SlotTimeline
Source§impl Debug for SlotTimeline
impl Debug for SlotTimeline
Source§impl Default for SlotTimeline
impl Default for SlotTimeline
Source§impl<'de> Deserialize<'de> for SlotTimeline
impl<'de> Deserialize<'de> for SlotTimeline
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>,
impl Eq for SlotTimeline
Source§impl PartialEq for SlotTimeline
impl PartialEq for SlotTimeline
Source§impl Serialize for SlotTimeline
impl Serialize for SlotTimeline
impl StructuralPartialEq for SlotTimeline
Auto Trait Implementations§
impl Forget for SlotTimeline
impl Freeze for SlotTimeline
impl Move for SlotTimeline
impl RefUnwindSafe for SlotTimeline
impl Send for SlotTimeline
impl Sync for SlotTimeline
impl Unpin for SlotTimeline
impl UnsafeUnpin for SlotTimeline
impl UnwindSafe for SlotTimeline
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.