Function load
pub fn load(path: &Path) -> Result<CalibrationArtifact>Expand description
Load and validate a calibration artifact from a JSON file.
§Errors
CodeLoreError::RepoIo (read-side input, exit 3) when the file cannot be
read; CodeLoreError::Analysis (exit 4) when the JSON is malformed or the
artifact fails validation — an unknown format_version, a wrong-length
quantile vector, or non-monotonic breakpoints. Callers propagate this as a
hard error: an explicitly passed calibration file that cannot be used is a
configuration mistake, not a degradable state.