Skip to main content

LiveJobOutcome

Struct LiveJobOutcome 

Source
pub struct LiveJobOutcome {
    pub local_job_id: String,
    pub remote_job_id: Option<RemoteBuildId>,
    pub selected_worker: Option<String>,
    pub slots: u32,
    pub kind: JobKind,
    pub disposition: LiveDisposition,
    pub queued: bool,
    pub queue_wait_ms: u64,
    pub runtime_ms: u64,
    pub queue_depth: Option<u32>,
}
Expand description

One observed REAL canary outcome from a live --load self-test run.

The consumer populates one of these per concurrent canary build it launched, recording how the build actually resolved (which worker the daemon selected, the remote build id it was assigned, whether it queued/fell back/was refused/cancelled, and the measured timings).

Fields§

§local_job_id: String

Local wrapper id (rchw-…) the hook minted for this job.

§remote_job_id: Option<RemoteBuildId>

Remote build id the daemon assigned once admitted; None if the job never reached a worker.

§selected_worker: Option<String>

The worker the scheduler selected; None for fallback/refusal/cancel.

§slots: u32

Slots the job requested (for slot-utilization accounting).

§kind: JobKind

Command kind (only affects the redacted command fingerprint).

§disposition: LiveDisposition

How the job actually resolved.

§queued: bool

Whether the job spent time in the queue before resolving (drives an intermediate queued event carrying attach/cancel guidance).

§queue_wait_ms: u64

Measured queue wait, milliseconds.

§runtime_ms: u64

Measured remote/local runtime, milliseconds.

§queue_depth: Option<u32>

Queue depth observed when the job resolved, if known.

Implementations§

Source§

impl LiveJobOutcome

Source

pub fn remote( local_job_id: impl Into<String>, worker: impl Into<String>, remote_id: RemoteBuildId, slots: u32, runtime_ms: u64, ) -> Self

A remote-success outcome: admitted to worker with remote_id, ran for runtime_ms.

Source

pub fn local_fallback( local_job_id: impl Into<String>, slots: u32, runtime_ms: u64, ) -> Self

A local-fallback outcome: no remote capacity, ran locally for runtime_ms.

Source

pub fn with_kind(self, kind: JobKind) -> Self

Override the command kind.

Source

pub fn queued_for(self, wait_ms: u64, depth: Option<u32>) -> Self

Mark the job as having queued, with the measured wait and depth.

Source

pub fn with_disposition(self, disposition: LiveDisposition) -> Self

Override the disposition (for fallback/refusal/cancel outcomes).

Trait Implementations§

Source§

impl Clone for LiveJobOutcome

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LiveJobOutcome

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for LiveJobOutcome

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LiveJobOutcome

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more