pub struct ObservationStats {
pub ops_evaluated: usize,
pub ops_total: usize,
pub objects_fetched: usize,
pub objects_total: usize,
pub channels_decoded: usize,
pub channels_total: usize,
pub entropy_bytes_decoded: u64,
pub descriptor_bytes_traversed: u64,
pub output_bytes: u64,
pub bytes_read: u64,
pub integrity_verified: bool,
}Expand description
Cost attribution for one observation.
All fields are measured from the evaluated path, not estimated.
Fields§
§ops_evaluated: usizeNumber of ops the observation actually evaluated.
ops_total: usizeTotal ops in the descriptor’s reconstruction program.
objects_fetched: usizeNumber of distinct raw objects read by evaluated ops.
objects_total: usizeTotal raw objects in the descriptor.
channels_decoded: usizeNumber of entropy channels decoded for this observation.
channels_total: usizeTotal entropy channels in the descriptor.
entropy_bytes_decoded: u64Sum of the encoded renormalization payload bytes of the decoded channels.
This is the descriptor-side entropy bytes consumed, not the decoded symbol
count (which is the referenced channels’ decoded_length). It is a
subset of Self::descriptor_bytes_traversed, which already counts
the same referenced channel payloads, so it is a breakdown and must
never be added to that field — the sum double-counts.
descriptor_bytes_traversed: u64Approximate descriptor bytes the path needed (see the module docs).
The honest decode-side bound: the graph record, the index record, the
referenced object payloads, and the referenced channel payloads (which
include Self::entropy_bytes_decoded).
output_bytes: u64Number of output bytes served.
bytes_read: u64Real bytes read from the source by the seek reader.
Zero for the in-memory Phase-7 path, which is handed a fully parsed
descriptor and performs no I/O of its own. This is a real I/O figure and
is distinct from Self::descriptor_bytes_traversed, which is a CPU-side
approximation kept for comparison.
integrity_verified: boolWhether the whole-source archival digest was verified for this report.
Always false for an observation view: a partial read cannot recompute the
whole-source SHA-256, so a served slice is an observation consistent with
the descriptor’s own validated program/index/directory – not a verified
archival read. Only materialize/decode/verify check INTEGRITY and
are the archival authority.
Implementations§
Source§impl ObservationStats
impl ObservationStats
Sourcepub fn work_amplification(&self) -> f64
pub fn work_amplification(&self) -> f64
Fraction of the program evaluated: ops_evaluated / ops_total.
Returns 0.0 when the program has no ops, so the ratio is always finite.