Skip to main content

Metrics

Struct Metrics 

Source
pub struct Metrics {
Show 88 fields pub nr_running: u64, pub total_runtime: u64, pub reserved_dispatches: u64, pub urgent_latency_dispatches: u64, pub urgent_latency_burst_grants: u64, pub urgent_latency_burst_continuations: u64, pub latency_dispatches: u64, pub shared_dispatches: u64, pub contained_dispatches: u64, pub local_fast_dispatches: u64, pub wake_preempt_dispatches: u64, pub budget_refill_events: u64, pub budget_exhaustions: u64, pub positive_budget_wakeups: u64, pub urgent_latency_enqueues: u64, pub latency_lane_enqueues: u64, pub latency_lane_candidates: u64, pub latency_candidate_local_enqueues: u64, pub latency_candidate_hog_blocks: u64, pub latency_debt_raises: u64, pub latency_debt_decays: u64, pub latency_debt_urgent_enqueues: u64, pub urgent_latency_misses: u64, pub reserved_local_enqueues: u64, pub reserved_global_enqueues: u64, pub shared_wakeup_enqueues: u64, pub runnable_wakeups: u64, pub cpu_release_reenqueues: u64, pub urgent_latency_burst_rounds: u64, pub high_priority_burst_rounds: u64, pub local_reserved_burst_rounds: u64, pub local_reserved_fast_grants: u64, pub local_reserved_burst_continuations: u64, pub local_quota_skips: u64, pub reserved_quota_skips: u64, pub quota_shared_forces: u64, pub quota_contained_forces: u64, pub init_task_events: u64, pub enable_events: u64, pub exit_task_events: u64, pub cpu_stability_biases: u64, pub last_cpu_matches: u64, pub cpu_migrations: u64, pub rt_sensitive_wakeups: u64, pub rt_sensitive_local_enqueues: u64, pub rt_sensitive_preempts: u64, pub reserved_lane_burst_rounds: u64, pub reserved_lane_grants: u64, pub reserved_lane_burst_continuations: u64, pub reserved_lane_skips: u64, pub reserved_lane_shared_forces: u64, pub reserved_lane_contained_forces: u64, pub reserved_lane_shared_misses: u64, pub reserved_lane_contained_misses: u64, pub contained_starved_head_enqueues: u64, pub shared_starved_head_enqueues: u64, pub direct_local_candidates: u64, pub direct_local_enqueues: u64, pub direct_local_rejections: u64, pub direct_local_mismatches: u64, pub ipc_wake_candidates: u64, pub ipc_local_enqueues: u64, pub ipc_score_raises: u64, pub ipc_boosts: u64, pub contained_enqueues: u64, pub hog_containment_enqueues: u64, pub hog_recoveries: u64, pub contained_starvation_rounds: u64, pub shared_starvation_rounds: u64, pub contained_rescue_dispatches: u64, pub shared_rescue_dispatches: u64, pub tune_latency_credit_grant: u64, pub tune_latency_credit_decay: u64, pub tune_latency_debt_urgent_min: u64, pub tune_urgent_latency_burst_max: u64, pub tune_reserved_quota_burst_max: u64, pub tune_contained_starvation_max: u64, pub tune_shared_starvation_max: u64, pub tune_local_fast_nr_running_max: u64, pub tune_local_reserved_burst_max: u64, pub tune_reserved_lane_burst_max: u64, pub autotune_generation: u64, pub autotune_mode: u64, pub tune_reserved_max_ns: u64, pub tune_shared_slice_ns: u64, pub tune_interactive_floor_ns: u64, pub tune_preempt_budget_min_ns: u64, pub tune_preempt_refill_min_ns: u64,
}

Fields§

§nr_running: u64

Number of running tasks

§total_runtime: u64

Total CPU runtime in ns

§reserved_dispatches: u64

Tasks dispatched from the reserved positive-budget DSQ

§urgent_latency_dispatches: u64

Tasks dispatched from the urgent latency lane DSQ

§urgent_latency_burst_grants: u64

Urgent-latency dispatches granted through the bounded burst path

§urgent_latency_burst_continuations: u64

Urgent-latency dispatches that continued an already-active burst window

§latency_dispatches: u64

Tasks dispatched from the dedicated latency lane DSQ

§shared_dispatches: u64

Tasks dispatched from the shared DSQ

§contained_dispatches: u64

Tasks dispatched from the contained throughput/background DSQ

§local_fast_dispatches: u64

Tasks fast-dispatched to local DSQs

§wake_preempt_dispatches: u64

Positive-budget wakeups sent to local DSQs with preempt kicks

§budget_refill_events: u64

Wakeups that refilled task budget

§budget_exhaustions: u64

Times a task ran its budget down to zero or below

§positive_budget_wakeups: u64

Wakeups that still had positive budget at enqueue time

§urgent_latency_enqueues: u64

Latency-debt wakeups inserted into the urgent latency lane

§latency_lane_enqueues: u64

Interactive wakeups inserted into the dedicated latency lane

§latency_lane_candidates: u64

Soft latency-lane candidates observed before final routing decisions

§latency_candidate_local_enqueues: u64

Latency-lane candidates that were consumed by the local reserved fast path

§latency_candidate_hog_blocks: u64

Soft latency-lane candidates blocked because they were already contained hogs

§latency_debt_raises: u64

Interactive budget exhaustions that raised per-task latency debt

§latency_debt_decays: u64

Times latency debt decayed after the scheduler gave a debt-bearing task latency service

§latency_debt_urgent_enqueues: u64

Latency-lane enqueues driven by accumulated latency debt rather than fresh wake credit alone

§urgent_latency_misses: u64

Urgent-debt wakeups that still missed the urgent lane and fell back to ordinary routing

§reserved_local_enqueues: u64

Positive-budget tasks inserted directly into selected local DSQs

§reserved_global_enqueues: u64

Positive-budget tasks enqueued to the reserved global DSQ

§shared_wakeup_enqueues: u64

Wakeups that fell back to the shared DSQ

§runnable_wakeups: u64

Runnable wakeups observed before enqueue/select_cpu decisions

§cpu_release_reenqueues: u64

Local DSQ tasks rescued during cpu_release

§urgent_latency_burst_rounds: u64

Maximum current consecutive urgent-latency dispatches within the bounded burst window across CPUs

§high_priority_burst_rounds: u64

Maximum current consecutive high-priority dispatches since shared or contained service last ran across CPUs

§local_reserved_burst_rounds: u64

Maximum current consecutive ordinary local-reserved fast-path enqueues under pressure across CPUs

§local_reserved_fast_grants: u64

Ordinary local-reserved fast-path grants that counted toward the local burst window

§local_reserved_burst_continuations: u64

Ordinary local-reserved fast-path grants that continued an already-active local burst window

§local_quota_skips: u64

Ordinary local-reserved fast-path enqueues skipped by the local burst cap

§reserved_quota_skips: u64

Dispatch rounds where a lower-lane quota check skipped the normal reserved/high-priority order

§quota_shared_forces: u64

Shared-lane dispatches forced early by the bounded quota

§quota_contained_forces: u64

Contained-lane dispatches forced early by the bounded quota

§init_task_events: u64

Tasks initialized through init_task task storage setup

§enable_events: u64

Tasks explicitly initialized on entry into scx_flow

§exit_task_events: u64

Tasks explicitly cleaned up on exit from scx_flow

§cpu_stability_biases: u64

Wakeups where select_cpu() biased toward the task’s last CPU

§last_cpu_matches: u64

Wakeups where the chosen target CPU matched the task’s last CPU

§cpu_migrations: u64

Observed task migrations between successive runs

§rt_sensitive_wakeups: u64

Pinned positive-budget wakeups classified into the RT-sensitive lane

§rt_sensitive_local_enqueues: u64

RT-sensitive wakeups inserted directly into selected local DSQs

§rt_sensitive_preempts: u64

RT-sensitive wakeups that used the preempt path

§reserved_lane_burst_rounds: u64

Maximum current consecutive dispatches from the reserved global DSQ across CPUs

§reserved_lane_grants: u64

Dispatches granted from the reserved global DSQ while reserved-lane shaping was active

§reserved_lane_burst_continuations: u64

Reserved global dispatches that continued an already-active reserved-lane burst window

§reserved_lane_skips: u64

Reserved global dispatches skipped because the reserved-lane burst cap engaged

§reserved_lane_shared_forces: u64

Shared-lane dispatches forced by the reserved-lane burst cap

§reserved_lane_contained_forces: u64

Contained-lane dispatches forced by the reserved-lane burst cap

§reserved_lane_shared_misses: u64

Reserved-lane cap attempts that wanted shared service but found no immediately dispatchable shared work

§reserved_lane_contained_misses: u64

Reserved-lane cap attempts that wanted contained service but found no immediately dispatchable contained work

§contained_starved_head_enqueues: u64

Contained-lane enqueues promoted to the head because the contained lane was already meaningfully starved

§shared_starved_head_enqueues: u64

Shared-lane enqueues promoted to the head because the shared lane was already meaningfully starved

§direct_local_candidates: u64

Direct-local wakeups that were eligible for the bounded front-door before final fast-path checks

§direct_local_enqueues: u64

Positive-budget wakeups routed through the bounded direct-local front-door without using the RT-sensitive path

§direct_local_rejections: u64

Direct-local candidates that lost the front-door and decayed back toward ordinary routing

§direct_local_mismatches: u64

Wakeups where the chosen target CPU did not match the remembered last CPU continuity hint

§ipc_wake_candidates: u64

Wakeups that qualified for the decayed IPC-confidence path

§ipc_local_enqueues: u64

IPC-confidence wakeups inserted directly into selected local DSQs

§ipc_score_raises: u64

Times the decayed IPC-confidence score strengthened after a short blocking run

§ipc_boosts: u64

Local slice boosts granted through the IPC-confidence path

§contained_enqueues: u64

Tasks routed into the dedicated contained throughput/background DSQ

§hog_containment_enqueues: u64

Enqueues where a persistent hog-like task had latency privileges reduced

§hog_recoveries: u64

Times a previously contained hog-like task decayed back below containment

§contained_starvation_rounds: u64

Maximum current consecutive dispatch rounds since a contained/background task last ran across CPUs

§shared_starvation_rounds: u64

Maximum current consecutive dispatch rounds since a shared-fallback task last ran across CPUs

§contained_rescue_dispatches: u64

Contained/background tasks rescued early by the fairness floor

§shared_rescue_dispatches: u64

Shared-fallback tasks rescued early by the fairness floor

§tune_latency_credit_grant: u64

Current latency-credit grant per strong interactive refill

§tune_latency_credit_decay: u64

Current latency-credit decay applied when credit is consumed or exhausted

§tune_latency_debt_urgent_min: u64

Current debt threshold required before a wakeup qualifies for the urgent latency lane

§tune_urgent_latency_burst_max: u64

Current maximum consecutive urgent-latency dispatches allowed in one burst

§tune_reserved_quota_burst_max: u64

Current maximum consecutive high-priority dispatches before lower-lane quota checks engage

§tune_contained_starvation_max: u64

Current contained-lane fairness-floor threshold

§tune_shared_starvation_max: u64

Current shared-lane fairness-floor threshold

§tune_local_fast_nr_running_max: u64

Current runnable-pressure cap for the ordinary local fast path

§tune_local_reserved_burst_max: u64

Current maximum consecutive ordinary local-reserved fast-path enqueues allowed under pressure

§tune_reserved_lane_burst_max: u64

Current maximum consecutive dispatches allowed from the reserved global DSQ before forcing a lower-lane rotation

§autotune_generation: u64

Adaptive tuning generation counter

§autotune_mode: u64

Adaptive tuning mode (0=balanced, 1=latency, 2=throughput)

§tune_reserved_max_ns: u64

Current reserved slice cap in ns

§tune_shared_slice_ns: u64

Current shared slice in ns

§tune_interactive_floor_ns: u64

Current interactive wake refill floor in ns

§tune_preempt_budget_min_ns: u64

Current preempt budget threshold in ns

§tune_preempt_refill_min_ns: u64

Current preempt refill threshold in ns

Implementations§

Source§

impl Metrics

Source

fn autotune_mode_name(&self) -> &'static str

Source

fn format<W: Write>(&self, w: &mut W) -> Result<()>

Source

pub fn delta(&self, rhs: &Self) -> Self

Trait Implementations§

Source§

impl Clone for Metrics

Source§

fn clone(&self) -> Metrics

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Metrics

Source§

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

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

impl Default for Metrics

Source§

fn default() -> Metrics

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Metrics

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Meta for Metrics

Source§

impl Serialize for Metrics

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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.

§

impl<T> NoneValue for T
where T: Default,

§

type NoneType = T

§

fn null_value() -> T

The none-equivalent value.
§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToJson for T
where T: Meta + Serialize,

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
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,