pub struct ScanStats {
pub lines: u64,
pub bytes: u64,
pub lines_skipped: u64,
pub finder_lines_skipped: u64,
pub positions: u64,
pub coarse_positions: u64,
pub candidate_positions: u64,
pub run_gated: u64,
pub coarse_rejected: Vec<u64>,
pub matches: u64,
pub sorts: u64,
pub finders: Vec<FinderStats>,
}Expand description
Operation counters collected by Scanner::scan_line_stats.
The counters describe how much work the scanner and its finders did, so that performance can be reasoned about independently of wall-clock time: a finder invocation is the unit of work the scanner dispatches, and the ratio of invocations to hits shows how well candidate filtering works.
Fields§
§lines: u64Lines scanned (including empty lines).
bytes: u64Bytes scanned.
lines_skipped: u64Lines on which the prescan disabled every finder.
finder_lines_skipped: u64Finder×line pairs disabled by the prescan.
positions: u64Positions visited by the dispatch and trigger loops (one per byte and per loop that ran).
coarse_positions: u64Positions the vector stage passed on to the exact gates
(Strategy::Vector only).
candidate_positions: u64Positions where at least one candidate finder was invoked.
run_gated: u64Finder invocations avoided by run rules.
coarse_rejected: Vec<u64>Coarse positions the exact gates rejected, by the byte at the position (diagnostics for the vector stage’s precision).
matches: u64Matches returned to the caller.
sorts: u64Lines whose matches had to be sorted.
finders: Vec<FinderStats>One entry per finder, in scanner order.