Skip to main content

PoolSnapshot

Struct PoolSnapshot 

Source
pub struct PoolSnapshot {
Show 26 fields pub name: Arc<str>, pub capacity: u32, pub busy: u32, pub held: u32, pub desired: u32, pub pending_by_class: [usize; 4], pub ready: usize, pub reservations: usize, pub window: Duration, pub dispatched: u64, pub succeeded: u64, pub failed: u64, pub retried: u64, pub priority_adherence: f64, pub fixed_start_hit_rate: f64, pub utilization: f64, pub schedule_efficiency: f64, pub wait_mean: Duration, pub wait_p50: Duration, pub wait_p90: Duration, pub wait_p99: Duration, pub run_p50: Duration, pub run_p99: Duration, pub worker_seconds: f64, pub cost: f64, pub groups: Vec<GroupSnapshot>,
}
Expand description

State and windowed quality metrics of one pool.

Counters and ratios cover the last PoolSnapshot::window (CoreConfig::metrics_window); worker_seconds and cost accumulate since start.

Fields§

§name: Arc<str>

Pool name.

§capacity: u32

Workers currently available to the pool.

§busy: u32

Workers currently running a task.

§held: u32

Workers held free for upcoming fixed-start tasks.

§desired: u32

Last autoscaler target (equals capacity without autoscaling).

§pending_by_class: [usize; 4]

Tasks not yet running (blocked, scheduled, ready or retrying), by priority class.

§ready: usize

Tasks ready to run right now (queued or due).

§reservations: usize

Active fixed-start reservations.

§window: Duration

Length of the metrics window.

§dispatched: u64

Attempts started in the window.

§succeeded: u64

Tasks that succeeded in the window.

§failed: u64

Attempts that failed in the window (including ones that will be retried).

§retried: u64

Retries scheduled in the window.

§priority_adherence: f64

Fraction of dispatches where no strictly higher class was waiting in the pool.

§fixed_start_hit_rate: f64

Fraction of fixed-start tasks started within tolerance (first attempts only).

§utilization: f64

Busy slot-seconds / capacity slot-seconds.

§schedule_efficiency: f64

Completed work seconds / capacity slot-seconds.

§wait_mean: Duration

Mean time from submission to first start.

§wait_p50: Duration

Median time from submission to first start.

§wait_p90: Duration

90th-percentile time from submission to first start.

§wait_p99: Duration

99th-percentile time from submission to first start.

§run_p50: Duration

Median runtime of successful attempts.

§run_p99: Duration

99th-percentile runtime of successful attempts.

§worker_seconds: f64

Capacity slot-seconds provisioned since start.

§cost: f64

worker_seconds × AutoscaleConfig::cost_per_worker_second since start.

§groups: Vec<GroupSnapshot>

Worker groups by label set (the unlabeled group first).

Implementations§

Source§

impl PoolSnapshot

Source

pub fn pending(&self) -> usize

Total tasks not yet running.

Trait Implementations§

Source§

impl Clone for PoolSnapshot

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 PoolSnapshot

Source§

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

Formats the value using the given formatter. Read more

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.