Skip to main content

AgentStats

Struct AgentStats 

Source
#[non_exhaustive]
pub struct AgentStats {
Show 42 fields pub session_duration_ns: u64, pub lookups: u64, pub unconsulted: u64, pub hits: u64, pub stores: u64, pub stored_bytes: u64, pub verifications: u64, pub divergences: u64, pub downloaded_bytes: u64, pub uploaded_bytes: u64, pub background_uploads: u64, pub background_upload_failures: u64, pub remote_blob_pack_uploads: u64, pub remote_blob_pack_upload_blobs: u64, pub upload_drain_duration_ns: u64, pub prefetched_actions: u64, pub predictions_loaded: u64, pub bypasses: BTreeMap<String, u64>, pub avoided_compiler_duration_ns: u64, pub compiler: BTreeMap<String, CompilerStats>, pub slow_compilations: BTreeMap<String, u64>, pub remote_failures: u64, pub remote_manifest_lookups: u64, pub remote_manifest_lookup_duration_ns: u64, pub remote_action_lookups: u64, pub remote_action_lookup_duration_ns: u64, pub remote_blob_requests: u64, pub remote_blob_pack_requests: u64, pub remote_blob_pack_blobs: u64, pub remote_blob_transfer_duration_ns: u64, pub local_cas_write_duration_ns: u64, pub prefetch_runs: u64, pub prefetch_duration_ns: u64, pub materialization_duration_ns: u64, pub restored_output_files: u64, pub restored_output_bytes: u64, pub reflinked_output_files: u64, pub reflinked_output_bytes: u64, pub copied_output_files: u64, pub copied_output_bytes: u64, pub reused_output_files: u64, pub reused_output_bytes: u64,
}
Expand description

Aggregate cache activity for one task session.

The agent produces these; nothing outside this crate has cause to build one. Saying so keeps a new counter from being a breaking change, which is what this type exists to accumulate – reach for AgentStats::default and assign the fields a test needs.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§session_duration_ns: u64

End-to-end lifetime of the task-scoped cache session.

§lookups: u64

Number of action-result lookups.

§unconsulted: u64

Compilations no action-result lookup was possible for, because no usable action key was available.

Counted separately from a miss, which is a lookup that found nothing. Both compile, but only a miss says a lookup happened.

§hits: u64

Number of lookups that found a valid local action result.

§stores: u64

Number of newly stored content-addressed objects.

§stored_bytes: u64

Total size of newly stored objects.

§verifications: u64

Number of cache hits compiled again for qualification.

§divergences: u64

Number of qualification builds that diverged from the cached result.

§downloaded_bytes: u64

CAS payload bytes downloaded from the remote cache.

§uploaded_bytes: u64

CAS payload bytes uploaded to the remote cache.

§background_uploads: u64

Objects published to the remote cache after the build asked for them.

A store request returns once the object is in the local CAS, so the upload it implies happens off the build’s critical path. This counts the blobs and action results that publication actually completed for.

§background_upload_failures: u64

Queued uploads that did not publish, having been reported and recovered from.

§remote_blob_pack_uploads: u64

Framed requests that published several blobs at once.

§remote_blob_pack_upload_blobs: u64

Blobs published through those framed requests.

§upload_drain_duration_ns: u64

Time the session spent waiting for queued uploads once the build ended.

§prefetched_actions: u64

Complete actions staged before an adapter requested them.

§predictions_loaded: u64

Predictions carried by the task manifest this session loaded.

Zero means no earlier build left a manifest behind – a genuinely cold start. Together with lookups, this is what tells a session that loaded hundreds of predictions and matched none of them apart from one that had nothing to match against; the first means the invocations changed (a compiler update does this to every one of them at once), the second that the store was empty.

§bypasses: BTreeMap<String, u64>

Compilations that were not cacheable, counted by reason.

§avoided_compiler_duration_ns: u64

Estimated compiler time avoided by restored action hits.

§compiler: BTreeMap<String, CompilerStats>

Real compiler work performed in this session, grouped by outcome.

§slow_compilations: BTreeMap<String, u64>

Cumulative real compiler time by crate name.

§remote_failures: u64

Remote cache operations that failed and were degraded to a local result.

A remote cache that cannot be reached, or that answers in a way this client refuses, costs hit rate rather than correctness, so every one of these is recovered from rather than raised. Counting them is what keeps a remote that is failing every request from reading as one that merely had nothing to offer.

§remote_manifest_lookups: u64

Number of task manifest requests made to the remote cache.

§remote_manifest_lookup_duration_ns: u64

Cumulative time spent requesting remote task manifests.

§remote_action_lookups: u64

Number of action-result requests made to the remote cache.

§remote_action_lookup_duration_ns: u64

Cumulative time spent requesting remote action results.

§remote_blob_requests: u64

Number of blob requests made to the remote cache.

§remote_blob_pack_requests: u64

Number of packed blob requests made to the remote cache.

§remote_blob_pack_blobs: u64

Number of verified blobs received through packed responses.

§remote_blob_transfer_duration_ns: u64

Cumulative time spent downloading and verifying remote blobs.

§local_cas_write_duration_ns: u64

Cumulative time spent ingesting downloaded blobs into the local CAS.

§prefetch_runs: u64

Number of speculative prefetch runs started for task manifests.

§prefetch_duration_ns: u64

Cumulative wall time of speculative task-manifest prefetch runs.

§materialization_duration_ns: u64

Cumulative time spent staging or materializing and validating cached outputs.

§restored_output_files: u64

Number of compiler output files restored from action hits.

§restored_output_bytes: u64

Declared size of compiler output files restored from action hits.

§reflinked_output_files: u64

Number of restored output files materialized with filesystem reflinks.

§reflinked_output_bytes: u64

Declared size of outputs materialized with filesystem reflinks.

§copied_output_files: u64

Number of restored output files materialized by copying their bytes.

§copied_output_bytes: u64

Declared size of outputs materialized by copying their bytes.

§reused_output_files: u64

Number of output files kept in place, already holding the cached bytes.

§reused_output_bytes: u64

Declared size of outputs kept in place.

Trait Implementations§

Source§

impl Clone for AgentStats

Source§

fn clone(&self) -> AgentStats

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 AgentStats

Source§

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

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

impl Default for AgentStats

Source§

fn default() -> AgentStats

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

impl Eq for AgentStats

Source§

impl PartialEq for AgentStats

Source§

fn eq(&self, other: &AgentStats) -> 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 AgentStats

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> 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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, <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.
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