#[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
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_duration_ns: u64End-to-end lifetime of the task-scoped cache session.
lookups: u64Number of action-result lookups.
unconsulted: u64Compilations 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: u64Number of lookups that found a valid local action result.
stores: u64Number of newly stored content-addressed objects.
stored_bytes: u64Total size of newly stored objects.
verifications: u64Number of cache hits compiled again for qualification.
divergences: u64Number of qualification builds that diverged from the cached result.
downloaded_bytes: u64CAS payload bytes downloaded from the remote cache.
uploaded_bytes: u64CAS payload bytes uploaded to the remote cache.
background_uploads: u64Objects 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: u64Queued uploads that did not publish, having been reported and recovered from.
remote_blob_pack_uploads: u64Framed requests that published several blobs at once.
remote_blob_pack_upload_blobs: u64Blobs published through those framed requests.
upload_drain_duration_ns: u64Time the session spent waiting for queued uploads once the build ended.
prefetched_actions: u64Complete actions staged before an adapter requested them.
predictions_loaded: u64Predictions 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: u64Estimated 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: u64Remote 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: u64Number of task manifest requests made to the remote cache.
remote_manifest_lookup_duration_ns: u64Cumulative time spent requesting remote task manifests.
remote_action_lookups: u64Number of action-result requests made to the remote cache.
remote_action_lookup_duration_ns: u64Cumulative time spent requesting remote action results.
remote_blob_requests: u64Number of blob requests made to the remote cache.
remote_blob_pack_requests: u64Number of packed blob requests made to the remote cache.
remote_blob_pack_blobs: u64Number of verified blobs received through packed responses.
remote_blob_transfer_duration_ns: u64Cumulative time spent downloading and verifying remote blobs.
local_cas_write_duration_ns: u64Cumulative time spent ingesting downloaded blobs into the local CAS.
prefetch_runs: u64Number of speculative prefetch runs started for task manifests.
prefetch_duration_ns: u64Cumulative wall time of speculative task-manifest prefetch runs.
materialization_duration_ns: u64Cumulative time spent staging or materializing and validating cached outputs.
restored_output_files: u64Number of compiler output files restored from action hits.
restored_output_bytes: u64Declared size of compiler output files restored from action hits.
reflinked_output_files: u64Number of restored output files materialized with filesystem reflinks.
reflinked_output_bytes: u64Declared size of outputs materialized with filesystem reflinks.
copied_output_files: u64Number of restored output files materialized by copying their bytes.
copied_output_bytes: u64Declared size of outputs materialized by copying their bytes.
reused_output_files: u64Number of output files kept in place, already holding the cached bytes.
reused_output_bytes: u64Declared size of outputs kept in place.
Trait Implementations§
Source§impl Clone for AgentStats
impl Clone for AgentStats
Source§fn clone(&self) -> AgentStats
fn clone(&self) -> AgentStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more