pub struct QueryCounters {
pub nodes_visited: u64,
pub approx_distances: u64,
pub exact_distances: u64,
pub seeks: u64,
pub bytes_read: u64,
pub sequential_runs: u64,
}Expand description
Physical counters accumulated by a single query as it executes.
These are the quantities the engine actually measures and the quantities the
storage-aware claims are stated in terms of. A hops-only view records only
nodes_visited; the storage-access terms (seeks, bytes_read,
sequential_runs) are exactly what that view omits.
Fields§
§nodes_visited: u64Nodes popped from the candidate queue (graph hops). Drives traversal cost.
approx_distances: u64Approximate (PQ/ADC) distances computed.
exact_distances: u64Exact (full SIMD) distances computed on fetched vectors.
seeks: u64Physical positioning operations (seeks) issued to storage.
bytes_read: u64Total bytes read from storage.
sequential_runs: u64Number of coalesced sequential runs the reads collapsed into.
With perfect demand paging this equals seeks; with elevator scheduling
and graph-aware layout it can be far smaller, which is the effect the
scheduler is meant to produce.
Implementations§
Source§impl QueryCounters
impl QueryCounters
Sourcepub fn visit_node(&mut self)
pub fn visit_node(&mut self)
Record a node pop (one graph hop).
Sourcepub fn add_approx(&mut self, n: u64)
pub fn add_approx(&mut self, n: u64)
Record n approximate distance computations.
Sourcepub fn add_read(&mut self, bytes: u64, seeks: u64, runs: u64)
pub fn add_read(&mut self, bytes: u64, seeks: u64, runs: u64)
Record a physical read of bytes that required seeks positioning
operations and collapsed into runs sequential runs.
Sourcepub fn merge(&mut self, other: &QueryCounters)
pub fn merge(&mut self, other: &QueryCounters)
Merge another counter set into this one (e.g. across parallel workers).