pub struct CaptureQuality {
pub window_seconds: u64,
pub instances_observed: u32,
pub lazy_parse_warning: bool,
pub untracked_ratio_percent: f64,
}Expand description
Capture-quality telemetry surfaced alongside the aggregate summary.
First-touch local-mode captures (fallow health --production-coverage-dir)
tend to produce short windows (minutes to an hour) against a single
instance. Lazy-parsed scripts do not appear in V8 dumps unless they
actually executed during the capture window, which a first-time user
will read as “the tool is broken” rather than “the capture window is
too short.” This struct gives the CLI enough information to explain the
state honestly and to quantify what continuous cloud monitoring would add.
Added in protocol 0.3.0 per ADR 009 step 6b, deliverable 2 of 3.
Fields§
§window_seconds: u64Total observation window in seconds. Finer-grained than
Summary::period_days, which rounds up to whole days. A 12-minute
local capture reports window_seconds: 720 and period_days: 1.
instances_observed: u32Number of distinct production instances that contributed to the
dump. Matches Summary::deployments_seen in the typical case but
is emitted separately so future captures can distinguish “one
deployment seen across many instances” from “many deployments”.
lazy_parse_warning: boolTrue when the untracked-function ratio exceeds
Self::LAZY_PARSE_THRESHOLD_PERCENT. Signals that the CLI should
render a “short window” warning: many functions appearing as
untracked most likely reflect lazy-parsed code rather than
unreachable code, and the capture window is not long enough to
distinguish the two.
untracked_ratio_percent: f64functions_untracked / functions_tracked as a percentage. Rounded
to two decimal places for JSON reproducibility. Provided so the CLI
can render the exact ratio that triggered the warning.
Implementations§
Source§impl CaptureQuality
impl CaptureQuality
Sourcepub const LAZY_PARSE_THRESHOLD_PERCENT: f64 = 30.0
pub const LAZY_PARSE_THRESHOLD_PERCENT: f64 = 30.0
Threshold above which Self::lazy_parse_warning fires. Chosen so
a short window (minutes) against a typical Node app trips the
warning, while a multi-day continuous capture does not.
Trait Implementations§
Source§impl Clone for CaptureQuality
impl Clone for CaptureQuality
Source§fn clone(&self) -> CaptureQuality
fn clone(&self) -> CaptureQuality
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more