pub struct PlatformCounters {
pub fetches_started: u64,
pub fetches_completed: u64,
pub fetch_bytes_sent: u64,
pub fetch_bytes_received: u64,
pub storage_reads: u64,
pub storage_writes: u64,
pub storage_bytes_read: u64,
pub storage_bytes_written: u64,
}Expand description
Everything one PlatformHost has moved.
Fields§
§fetches_started: u64Requests handed to the provider.
fetches_completed: u64Requests drained from the ready queue.
Counts failures as well as responses: a request that could not be
completed still completed, in the sense the queue means. The gap between
this and fetches_started is the number still in flight, plus any
released before they were drained.
fetch_bytes_sent: u64Request-body bytes handed to the provider.
Counted at start_fetch, so it
counts what was submitted rather than what reached a server. A request
that failed to connect still counted its body here, which is correct for
the question “what did the guest ask us to send”.
fetch_bytes_received: u64Response-body bytes, counted once per request when it is drained.
Once, not once per read: a guest reading the same body twice has moved
twice the bytes across its own boundary, and that is the binding’s
counter to keep. Headers are not counted, because a provider may
synthesise them (data: URLs) and a compressed transfer never carried
the bytes the header map now holds.
storage_reads: u64§storage_writes: u64Every call that could change the store: set, remove, clear.
A remove of an absent key and a clear of an empty origin are counted
even though nothing changed, because this crate does not ask the
provider whether anything did. It is a count of calls, not of edits.
storage_bytes_read: u64Value bytes returned by get. A miss adds nothing.
storage_bytes_written: u64Key plus value bytes accepted by set. A rejected write adds nothing.
Trait Implementations§
Source§impl Clone for PlatformCounters
impl Clone for PlatformCounters
Source§fn clone(&self) -> PlatformCounters
fn clone(&self) -> PlatformCounters
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more