Documentation
¶
Overview ¶
Package testperformance owns qualification records for verification-performance evidence.
Index ¶
- Constants
- func HasComponentRegressions(report Report) bool
- func MatchEnvironment(reference, candidate Environment) error
- func Validate(r Record) error
- func WriteHuman(w io.Writer, report Report)
- type Aggregate
- type Baseline
- type Budget
- type Component
- type Delta
- type Environment
- type Evaluation
- type Observation
- type Record
- type Report
- type SampleMethod
- type Workload
Constants ¶
const Version = 2
Version is the supported qualification-record schema version.
Variables ¶
This section is empty.
Functions ¶
func HasComponentRegressions ¶
HasComponentRegressions reports whether deterministic qualification failed.
func MatchEnvironment ¶
func MatchEnvironment(reference, candidate Environment) error
MatchEnvironment refuses comparison unless every identity field matches.
func Validate ¶
Validate checks the complete qualification contract without comparing unlike environments.
func WriteHuman ¶
WriteHuman renders a report without changing its source record.
Types ¶
type Aggregate ¶
type Aggregate struct {
Workload string `json:"workload"`
Environment string `json:"environment"`
Cache string `json:"cache"`
Samples int `json:"samples"`
Seconds float64 `json:"seconds"`
Components []Component `json:"components"`
}
Aggregate summarizes same-workload, same-environment observations.
func Aggregates ¶
Aggregates produces stable median timing evidence while retaining every component identity.
type Baseline ¶
type Baseline struct {
Workload string `json:"workload"`
Environment string `json:"environment"`
Seconds float64 `json:"seconds"`
Components []Component `json:"components"`
}
Baseline records landed evidence for one like-for-like workload.
type Budget ¶
type Budget struct {
Workload string `json:"workload"`
Environment string `json:"environment"`
Qualification string `json:"qualification"`
MaximumSeconds float64 `json:"maximum_seconds"`
StrongerTargetSeconds float64 `json:"stronger_target_seconds"`
ComponentMaximums []Component `json:"component_maximums"`
}
Budget records threshold and component targets for one workload.
type Component ¶
type Component struct {
Stage string `json:"stage"`
Package string `json:"package"`
Test string `json:"test"`
Seconds float64 `json:"seconds"`
}
Component keeps the stage, package, and test timing identity intact.
type Delta ¶
type Delta struct {
Workload string `json:"workload"`
Environment string `json:"environment"`
Cache string `json:"cache"`
Sample int `json:"sample"`
EvidenceClass string `json:"evidence_class"`
Result string `json:"result"`
Component string `json:"component,omitempty"`
BaselineSeconds float64 `json:"baseline_seconds"`
ObservedSeconds float64 `json:"observed_seconds"`
DeltaSeconds float64 `json:"delta_seconds"`
DeltaPercent float64 `json:"delta_percent"`
}
Delta reports like-for-like achieved evidence without turning it into a budget claim.
type Environment ¶
type Environment struct {
ID string `json:"id"`
Kind string `json:"kind"`
CPU string `json:"cpu"`
OS string `json:"os"`
Architecture string `json:"architecture"`
Filesystem string `json:"filesystem"`
Memory string `json:"memory"`
RunnerImage string `json:"runner_image"`
Toolchain string `json:"toolchain"`
}
Environment identifies one local or hosted measurement machine completely.
type Evaluation ¶
type Evaluation struct {
Workload string `json:"workload"`
Environment string `json:"environment"`
WallTime string `json:"wall_time"`
MaximumSeconds float64 `json:"maximum_seconds"`
ObservedSeconds float64 `json:"observed_seconds"`
MeetsMaximum bool `json:"meets_maximum"`
ComponentRegressions []string `json:"component_regressions,omitempty"`
}
Evaluation classifies aggregate evidence against a declared budget.
func Evaluate ¶
func Evaluate(r Record, aggregates []Aggregate) []Evaluation
Evaluate deterministically classifies timing evidence and component budget regressions.
type Observation ¶
type Observation struct {
Workload string `json:"workload"`
Environment Environment `json:"environment"`
Cache string `json:"cache"`
Sample int `json:"sample"`
EvidenceClass string `json:"evidence_class"`
Result string `json:"result"`
Seconds float64 `json:"seconds"`
Components []Component `json:"components"`
}
Observation records one measured sample and its component evidence.
type Record ¶
type Record struct {
Version int `json:"version"`
Workloads []Workload `json:"workloads"`
Environments []Environment `json:"environments"`
SampleMethod SampleMethod `json:"sample_method"`
Baselines []Baseline `json:"baselines"`
Budgets []Budget `json:"budgets"`
Observations []Observation `json:"observations"`
}
Record is the versioned, canonical qualification evidence for test performance.
type Report ¶
type Report struct {
RecordVersion int `json:"record_version"`
Workloads []Workload `json:"workloads"`
Environments []Environment `json:"environments"`
SampleMethod SampleMethod `json:"sample_method"`
Baselines []Baseline `json:"baselines"`
Budgets []Budget `json:"budgets"`
Observations []Observation `json:"observations"`
Aggregates []Aggregate `json:"aggregates"`
Deltas []Delta `json:"deltas"`
Evaluations []Evaluation `json:"evaluations"`
}
Report is the shared input for human and machine renderings.
func BuildReport ¶
BuildReport creates human and machine output from one observation set.
type SampleMethod ¶
type SampleMethod struct {
CachePreparation []string `json:"cache_preparation"`
WarmSamples int `json:"warm_samples"`
ColdSamples int `json:"cold_samples"`
Aggregation string `json:"aggregation"`
WallTime string `json:"wall_time"`
}
SampleMethod describes reproducible cache and sampling treatment.