Skip to main content

Crate perfgate_domain

Crate perfgate_domain 

Source
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§

BinaryBlame
Result of a binary blame analysis.
BudgetResult
Result of evaluating a single metric against a budget.
Comparison
DependencyChange
Information about a dependency change.
Finding
A single finding in a report.
FindingData
Data for a single finding in a report.
PairedComparison
Result of comparing paired statistics, including significance testing.
Report
Report derived from a CompareReceipt.
SignificancePolicy
TrendAnalysis
Result of trend analysis for a single metric.
TrendConfig
Parameters controlling drift classification thresholds.

Enums§

BudgetError
Errors that can occur during budget evaluation.
DependencyChangeType
DomainError
DriftClass
Classification of metric drift direction and severity.
StatsError

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 f64 slice.
summarize_u64
Compute min, max, and median for a u64 slice.