Expand description
Validation report generation and display.
This module provides types for structured validation results and functions to generate human-readable output and JSON reports.
§Report Structure
ValidationReport- Top-level report containing all resultsSuiteResult- Results for a test suite (e.g., “linear”, “nonlinear”)TestResult- Results for a single test caseSignalResult- Results for each test signalComparisonMetrics- Detailed metric values
§Example
ⓘ
use pedalkernel_validate::report::ValidationReport;
use std::collections::HashMap;
// After running tests, create a report
let report = ValidationReport::new(suite_results, 96000, 4);
// Print to terminal
report.print_summary();
// Print detailed metrics table
report.print_detailed();
// Save as JSON
report.save_json("report.json").unwrap();§JSON Format
The JSON output includes:
- Timestamp and git commit (if available)
- Sample rate and oversampling settings
- Per-suite and per-test results
- Summary statistics (pass/fail counts, pass rate)
Structs§
- Comparison
Metrics - Serializable version of ComparisonResult.
- Profile
Summary - Summary of test results for one validation profile.
- Report
Summary - Summary of all test results.
- Signal
Result - Result for a single signal within a test.
- Suite
Result - Result for a single test suite.
- Test
Result - Result for a single test case.
- Validation
Report - Full validation report.
Functions§
- format_
boundary_ disposition - Compact human-readable boundary-load DISPOSITION —
FusedUpstreamorUnloaded{reason}(namespaced reasons:env:*,gate:*,analysis:*). - format_
boundary_ model - Compact human-readable boundary-load MODEL summary — kind + element values +
component ids, e.g.
SeriesCapIntoLoad{10µF → 10kΩ; Cout,RL}. - render_
ac_ accuracy - Render the AC-accuracy table for a set of per-circuit results.
- render_
bias_ accuracy - Render the bias-accuracy table for a set of per-circuit op-point results.
- render_
boundary_ loads - Render the compact per-circuit boundary-load decision table: one row per
analyzed stage output boundary (model + disposition), one explicit
no-analysis (empty table)row per circuit whose table is EMPTY (that absence is itself a triage signal, distinct fromUnloaded{reason}), and a trailing flag line per circuit whose output boundary is open (seeunloaded_output_flag). - unloaded_
output_ flag - WSL/NaN triage flag:
Some(flag)when a circuit’s OUTPUT boundary is left electrically open — either an analyzed boundary whose disposition isUnloaded{reason}, or an EMPTY table (no feedback group ever reached the general-MNA call site, e.g. the whole pedal compiled via blockwise/other paths — the boundary was never even analyzed). The two absence modes are surfaced DISTINCTLY because they need different fixes (widen the policy vs widen the analysis coverage).