Expand description
Domain logic for perfgate.
Pure, I/O-free business logic: statistics computation, budget policy evaluation, host mismatch detection, and regression analysis. All data comes in via function arguments; no filesystem, network, or process access.
Part of the perfgate workspace.
Structs§
- Binary
Blame - Result of a binary blame analysis.
- Budget
Result - Result of evaluating a single metric against a budget.
- Comparison
- Dependency
Change - Information about a dependency change.
- Finding
- A single finding in a report.
- Finding
Data - Data for a single finding in a report.
- Paired
Comparison - Result of comparing paired statistics, including significance testing.
- Report
- Report derived from a CompareReceipt.
- Significance
Policy - Trend
Analysis - Result of trend analysis for a single metric.
- Trend
Config - Parameters controlling drift classification thresholds.
Enums§
- Budget
Error - Errors that can occur during budget evaluation.
- Dependency
Change Type - Domain
Error - Drift
Class - Classification of metric drift direction and severity.
- Stats
Error
Functions§
- aggregate_
verdict - Aggregates multiple metric statuses into a final verdict.
- analyze_
trend - Perform a full trend analysis on a sequence of metric values.
- calculate_
regression - Calculates the regression percentage between baseline and current values.
- classify_
drift - Classify the drift of a metric given regression parameters.
- compare_
lockfiles - Compares two lockfiles and returns the differences.
- compare_
paired_ stats - Compare paired statistics and compute a confidence interval.
- compare_
runs - Compare full run receipts under the provided budgets.
- compare_
stats - Compare stats under the provided budgets.
- compute_
headroom_ pct - Compute headroom as a percentage: how far the current value is from the threshold.
- compute_
paired_ cv - Compute the coefficient of variation (CV) of the wall-time differences from a set of paired samples (excluding warmups).
- compute_
paired_ stats - Compute summary statistics from paired benchmark samples.
- compute_
significance - Compute statistical significance using Welch’s t-test.
- compute_
stats - Compute perfgate stats from samples.
- derive_
report - Derives a report from a CompareReceipt.
- detect_
host_ mismatch - Detect host mismatches between baseline and current runs.
- determine_
status - Determines the metric status based on regression and thresholds.
- evaluate_
budget - Evaluates a metric against a budget threshold.
- evaluate_
budgets - Evaluates multiple metrics against their budgets.
- linear_
regression - Fit a simple linear regression: y = slope * x + intercept.
- mean_
and_ variance - Compute sample mean and unbiased variance (Bessel’s correction).
- median_
f64_ sorted - median_
u64_ sorted - metric_
value - parse_
lockfile - Parses a Cargo.lock string and returns a map of package name to version.
- predict_
breach_ run - Predict the run index at which the regression line crosses
threshold. - reason_
token - Generates a reason token for a metric status.
- spark_
chart - Render a mini ASCII spark chart for a series of values.
- summarize_
f64 - Compute min, max, and median for an
f64slice. - summarize_
u64 - Compute min, max, and median for a
u64slice.