← All compilation units

Flyology_Bench.Baselines

Description

Samples and compatibility metadata loaded from a baseline file.

Baseline

type Baseline is private;

Samples and compatibility metadata loaded from a baseline file.

Compare

function Compare
  (Saved      : Baseline;
   Current    : Measurement;
   Fingerprint : String := "";
   Practical_Threshold_Percent : Long_Float := 1.0;
   Random_Seed : Long_Long_Integer := 1) return Regression

Compare a current run with an independently collected baseline using an independent percentile bootstrap of arithmetic-mean ratios.

Parameters
Saved

Previously loaded baseline.

Current

Current compatible measurement.

Fingerprint

Current environment identity; empty selects the default metadata fingerprint.

Practical_Threshold_Percent

Smallest meaningful time change.

Random_Seed

Deterministic bootstrap seed.

Return value

Compatibility, interval, change, and verdict.

Compatible

function Compatible (Result : Regression) return Boolean

Return whether clock backend and environment fingerprint match.

Parameters
Result

Regression result.

Return value

True when comparing the runs is permitted.

Fingerprint

function Fingerprint (Saved : Baseline) return String

Return the caller-defined environment fingerprint.

Parameters
Saved

Loaded baseline.

Return value

Stored fingerprint, possibly empty.

Load

function Load (Path : String) return Baseline

Load a baseline written by Save.

Parameters
Path

Existing baseline path.

Return value

Parsed baseline and raw samples.

Name

function Name (Saved : Baseline) return String

Return the name stored in a baseline.

Parameters
Saved

Loaded baseline.

Return value

Stored benchmark name.

Regression

type Regression is private;

Independent-run regression result. Direct Compare remains preferable when both implementations can run in the same process.

Save

procedure Save
  (Path        : String;
   Name        : String;
   Result      : Measurement;
   Fingerprint : String := "")

Save a measurement and all retained samples. Fingerprint should identify the host, CPU policy, toolchain, switches, and revision relevant to the caller's regression policy. Empty selects Metadata.Fingerprint. Newlines are rejected.

Parameters
Path

Destination baseline path, replaced when it already exists.

Name

Stable benchmark name.

Result

Completed measurement.

Fingerprint

Caller-defined environment identity.

Speedup

function Speedup (Result : Regression) return Long_Float

Return baseline-time/current-time ratio. Greater than one is faster.

Parameters
Result

Compatible regression result.

Return value

Arithmetic-mean speedup.

Speedup_Confidence_High

function Speedup_Confidence_High (Result : Regression) return Long_Float

Return the upper endpoint of the independent bootstrap interval.

Parameters
Result

Compatible regression result.

Return value

Upper 95% speedup bound.

Speedup_Confidence_Low

function Speedup_Confidence_Low (Result : Regression) return Long_Float

Return the lower endpoint of the independent bootstrap interval.

Parameters
Result

Compatible regression result.

Return value

Lower 95% speedup bound.

Time_Change_Percent

function Time_Change_Percent (Result : Regression) return Long_Float

Return current time change relative to baseline. Negative is faster.

Parameters
Result

Compatible regression result.

Return value

Relative arithmetic-mean time change in percent.

Verdict

function Verdict (Result : Regression) return Comparison_Verdict

Return the practical/statistical regression verdict.

Parameters
Result

Regression result.

Return value

Verdict, or Inconclusive when incompatible.