Skip to main content

Crate perfgate_types

Crate perfgate_types 

Source
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: Enables Arbitrary derive for structure-aware fuzzing with cargo-fuzz.

Structs§

BaselineServerConfig
Configuration for the baseline server connection.
BenchConfigFile
BenchMeta
Budget
BudgetOverride
Capability
A capability with its status and optional reason.
CompareReceipt
A versioned receipt comparing baseline vs current (perfgate.compare.v1).
CompareRef
ConfigFile
Top-level configuration file (perfgate.toml).
DefaultsConfig
Delta
F64Summary
FindingData
Data associated with a metric finding.
HostInfo
HostMismatchInfo
Details about a detected host mismatch between baseline and current runs.
NoiseDiagnostics
Diagnostics about noise in paired benchmark measurements.
PairedBenchMeta
PairedDiffSummary
PairedRunReceipt
PairedSample
PairedSampleHalf
PairedStats
PerfgateReport
A performance report wrapping compare results in a cockpit-compatible envelope.
ReportFinding
A single finding from the performance check.
ReportSummary
Summary counts and key metrics for the report.
RunMeta
RunReceipt
A versioned receipt from a single benchmark run (perfgate.run.v1).
Sample
ScalingConfig
Configuration for computational complexity validation.
SensorArtifact
An artifact produced by the sensor.
SensorCapabilities
Capabilities available to the sensor.
SensorFinding
A finding from the sensor.
SensorReport
The sensor.report.v1 envelope for cockpit integration.
SensorRunMeta
Run metadata for the sensor report.
SensorVerdict
Verdict for the sensor report.
SensorVerdictCounts
Verdict counts for the sensor report.
Significance
SignificancePolicy
Policy for statistical significance testing.
Stats
Aggregated statistics for a benchmark run.
ToolInfo
U64Summary
Verdict
Overall verdict for a comparison, with pass/warn/fail counts.
VerdictCounts

Enums§

BenchNameValidationError
CapabilityStatus
Capability status for “No Green By Omission” principle.
ConfigValidationError
Direction
HostMismatchPolicy
Policy for handling host mismatches when comparing receipts from different machines.
Metric
MetricStatistic
MetricStatus
NoiseLevel
Noise level classification for paired benchmark results.
NoisePolicy
PerfgateError
SensorSeverity
Severity level for sensor findings (cockpit vocabulary).
SensorVerdictStatus
Verdict status for the sensor report.
Severity
Severity level for a finding.
SignificanceTest
VerdictStatus

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

Functions§

validate_bench_name