Skip to main content

ObservationStats

Struct ObservationStats 

Source
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: usize

Number of ops the observation actually evaluated.

§ops_total: usize

Total ops in the descriptor’s reconstruction program.

§objects_fetched: usize

Number of distinct raw objects read by evaluated ops.

§objects_total: usize

Total raw objects in the descriptor.

§channels_decoded: usize

Number of entropy channels decoded for this observation.

§channels_total: usize

Total entropy channels in the descriptor.

§entropy_bytes_decoded: u64

Sum 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: u64

Approximate 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: u64

Number of output bytes served.

§bytes_read: u64

Real 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: bool

Whether 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

Source

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.

Trait Implementations§

Source§

impl Clone for ObservationStats

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 Copy for ObservationStats

Source§

impl Debug for ObservationStats

Source§

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

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

impl PartialEq for ObservationStats

Source§

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

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> 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, !>

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.