Expand description
Shared types for perfgate.
Design goal: versioned, explicit, boring. These structs are used for receipts, PR comments, and (eventually) long-term baselines.
Part of the perfgate workspace.
§Examples
Round-trip a ToolInfo through JSON:
use perfgate_types::ToolInfo;
let tool = ToolInfo { name: "perfgate".into(), version: "1.0.0".into() };
let json = serde_json::to_string(&tool).unwrap();
let back: ToolInfo = serde_json::from_str(&json).unwrap();
assert_eq!(tool, back);§Feature Flags
arbitrary: EnablesArbitraryderive for structure-aware fuzzing with cargo-fuzz.
Structs§
- Baseline
Server Config - Configuration for the baseline server connection.
- Bench
Config File - Bench
Meta - Budget
- Budget
Override - Capability
- A capability with its status and optional reason.
- Compare
Receipt - A versioned receipt comparing baseline vs current (
perfgate.compare.v1). - Compare
Ref - Config
File - Top-level configuration file (
perfgate.toml). - Defaults
Config - Delta
- F64Summary
- Finding
Data - Data associated with a metric finding.
- Host
Info - Host
Mismatch Info - Details about a detected host mismatch between baseline and current runs.
- Noise
Diagnostics - Diagnostics about noise in paired benchmark measurements.
- Paired
Bench Meta - Paired
Diff Summary - Paired
RunReceipt - Paired
Sample - Paired
Sample Half - Paired
Stats - Perfgate
Report - A performance report wrapping compare results in a cockpit-compatible envelope.
- Report
Finding - A single finding from the performance check.
- Report
Summary - Summary counts and key metrics for the report.
- RunMeta
- RunReceipt
- A versioned receipt from a single benchmark run (
perfgate.run.v1). - Sample
- Scaling
Config - Configuration for computational complexity validation.
- Sensor
Artifact - An artifact produced by the sensor.
- Sensor
Capabilities - Capabilities available to the sensor.
- Sensor
Finding - A finding from the sensor.
- Sensor
Report - The sensor.report.v1 envelope for cockpit integration.
- Sensor
RunMeta - Run metadata for the sensor report.
- Sensor
Verdict - Verdict for the sensor report.
- Sensor
Verdict Counts - Verdict counts for the sensor report.
- Significance
- Significance
Policy - Policy for statistical significance testing.
- Stats
- Aggregated statistics for a benchmark run.
- Tool
Info - U64Summary
- Verdict
- Overall verdict for a comparison, with pass/warn/fail counts.
- Verdict
Counts
Enums§
- Bench
Name Validation Error - Capability
Status - Capability status for “No Green By Omission” principle.
- Config
Validation Error - Direction
- Host
Mismatch Policy - Policy for handling host mismatches when comparing receipts from different machines.
- Metric
- Metric
Statistic - Metric
Status - Noise
Level - Noise level classification for paired benchmark results.
- Noise
Policy - Perfgate
Error - Sensor
Severity - Severity level for sensor findings (cockpit vocabulary).
- Sensor
Verdict Status - Verdict status for the sensor report.
- Severity
- Severity level for a finding.
- Significance
Test - Verdict
Status
Constants§
- BASELINE_
REASON_ NO_ BASELINE - BASELINE_
SCHEMA_ V1 - BENCH_
NAME_ MAX_ LEN - BENCH_
NAME_ PATTERN - CHECK_
ID_ BASELINE - CHECK_
ID_ BUDGET - CHECK_
ID_ HOST - CHECK_
ID_ TOOL_ RUNTIME - CHECK_
ID_ TOOL_ TRUNCATION - COMPARE_
SCHEMA_ V1 - CONFIG_
SCHEMA_ V1 - ERROR_
KIND_ EXEC - ERROR_
KIND_ IO - ERROR_
KIND_ PARSE - FINDING_
CODE_ BASELINE_ MISSING - FINDING_
CODE_ HOST_ MISMATCH - FINDING_
CODE_ METRIC_ FAIL - FINDING_
CODE_ METRIC_ WARN - FINDING_
CODE_ RUNTIME_ ERROR - FINDING_
CODE_ TRUNCATED - MAX_
FINDINGS_ DEFAULT - PAIRED_
SCHEMA_ V1 - REPORT_
SCHEMA_ V1 - RUN_
SCHEMA_ V1 - SENSOR_
REPORT_ SCHEMA_ V1 - STAGE_
BASELINE_ RESOLVE - STAGE_
CONFIG_ PARSE - STAGE_
RUN_ COMMAND - STAGE_
WRITE_ ARTIFACTS - VERDICT_
REASON_ HOST_ MISMATCH - VERDICT_
REASON_ NO_ BASELINE - VERDICT_
REASON_ TOOL_ ERROR - VERDICT_
REASON_ TRUNCATED