← All compilation units

Flyology_Bench

Description

Configuration bounds are carried by the subtypes and record predicates below rather than by a validation pass. Predicates are assertions, and this crate builds without -gnata, so they are enabled explicitly.

All_Builtin_Metrics

All_Builtin_Metrics        : constant Metric_Set := Process_Resource_Metrics or Linux_Hardware_Metrics;

Every built-in axis; Flyology scheduler counters remain opt-in because the standalone crate has no dependency on the Flyology runtime.

Bootstrap_Resample_Count

subtype Bootstrap_Resample_Count is Positive range 100 .. 10_000;

Number of bootstrap distributions drawn for each reported interval. The upper bound keeps analysis time and temporary storage bounded.

Bootstrap_Resamples

function Bootstrap_Resamples (Result : Comparison) return Bootstrap_Resample_Count

Return the bootstrap resample count used to analyze this comparison.

Parameters
Result

Completed comparison.

Return value

Number of bootstrap distributions drawn per interval.

Bootstrap_Resamples

function Bootstrap_Resamples (Result : Measurement) return Bootstrap_Resample_Count

Return the bootstrap resample count used to analyze this measurement.

Parameters
Result

Completed measurement.

Return value

Number of bootstrap distributions drawn per interval.

Capacity_Error

Capacity_Error : exception;

Raised when bounded custom metric registration is full.

Case_Measurement

function Case_Measurement (Result : Multi_Comparison; Index : Comparison_Case_Index) return Measurement

Return one case's measurement. Index one is the reference.

Parameters
Result

Completed multi-way comparison.

Index

Case index in enumeration order.

Return value

Selected case measurement.

Raised exceptions
Constraint_Error

If Index exceeds the measured case count.

Cases

function Cases (Result : Multi_Comparison) return Comparison_Case_Count

Return the number of implementations in a multi-way comparison.

Parameters
Result

Completed multi-way comparison.

Return value

Number of measured cases, including the reference.

Clobber_Memory

procedure Clobber_Memory

Prevent memory operations from moving across this compiler barrier.

Clock_Backend

function Clock_Backend (Result : Measurement) return String

Return the platform clock implementation used for the measurement.

Parameters
Result

Completed measurement.

Return value

Stable human-readable backend identifier.

Clock_Resolution_Nanoseconds

function Clock_Resolution_Nanoseconds (Result : Measurement) return Long_Float

Return the platform-reported clock resolution.

Parameters
Result

Completed measurement.

Return value

Nominal clock resolution in nanoseconds.

Coefficient_Of_Variation_Percent

function Coefficient_Of_Variation_Percent (Result : Measurement) return Long_Float

Return sample dispersion relative to the arithmetic mean.

Parameters
Result

Completed measurement.

Return value

Sample standard deviation as a percentage of the mean.

Compare

generic
   with procedure Reference_Operation;
   with procedure Contender_Operation;
procedure Compare (Config : Configuration := Default_Configuration; Result : out Comparison)

Measure two operations in adjacent, order-balanced sample pairs. Equal timed slices are the default; Shared_Iterations can require one count.

Generic formal parameters
Reference_Operation
Contender_Operation
Parameters
Config

Shared measurement policy.

Result

Paired measurements and relative statistics.

Raised exceptions
Constraint_Error

Config requests more than the bounded bootstrap analysis work.

Compare_Batched

generic
   with procedure Reference_Batch (Iterations : Iteration_Count);
   with procedure Contender_Batch (Iterations : Iteration_Count);
procedure Compare_Batched (Config : Configuration := Default_Configuration; Result : out Comparison)

Measure two caller-controlled batches in adjacent, order-balanced sample pairs. Each batch must perform exactly Iterations logical operations.

Generic formal parameters
Reference_Batch
Contender_Batch
Parameters
Config

Shared measurement policy.

Result

Paired measurements and relative statistics.

Raised exceptions
Constraint_Error

Config requests more than the bounded bootstrap analysis work.

Compare_Custom_Metric

function Compare_Custom_Metric
  (Result : Comparison; Axis : Custom_Metric_Index) return Metric_Comparison_Result

Return one paired custom metric comparison.

Parameters
Result

Completed direct or multi-way paired comparison.

Axis

Registered custom axis.

Return value

Paired comparison, unavailable unless both sides are complete.

Compare_Many

generic
   type Case_Id is (<>);
   with procedure Batch (Which : Case_Id; Iterations : Iteration_Count);
procedure Compare_Many (Config : Configuration := Default_Configuration; Result : out Multi_Comparison)

Compare two to sixteen implementations in shared rounds. Each case gets a comparable timed slice by default and occupies every execution position equally, or within one round when counts are indivisible. Sampling progress identifies each implementation separately.

Generic formal parameters
Case_Id
Batch
Parameters
Config

Shared measurement policy.

Result

Multi-way measurements and comparisons against case one.

Raised exceptions
Constraint_Error

Config requests more than the bounded bootstrap analysis work.

Compare_Metric

function Compare_Metric (Result : Comparison; Axis : Metric_Axis) return Metric_Comparison_Result

Compare one retained axis using the same paired sample schedule as wall time. Positive-only axes use relative ratios; signed or zero-containing axes use paired absolute differences.

Parameters
Result

Completed comparison.

Axis

Requested measurement axis.

Return value

Available or unavailable paired metric comparison.

Comparison

type Comparison is private;

Paired measurements and relative statistics for two implementations.

Comparison_Batch_Policy

type Comparison_Batch_Policy is (Equal_Time, Shared_Iterations);

Controls how comparison batches divide their wall-time budget. Equal_Time independently calibrates each implementation toward the same per-sample duration. Shared_Iterations uses one logical operation count for every implementation, so elapsed time varies with their speed.

Enumeration literals
Equal_Time

Independently calibrate equal timed slices.

Shared_Iterations

Use one logical operation count for every case.

Comparison_Case_Count

subtype Comparison_Case_Count is Positive range 2 .. Max_Comparison_Cases;

Number of implementations participating in a multi-way comparison.

Comparison_Case_Index

subtype Comparison_Case_Index is Positive range 1 .. Max_Comparison_Cases;

One-based implementation index in enumeration order.

Comparison_Verdict

type Comparison_Verdict is (Inconclusive, Practically_Equivalent, Contender_Faster, Reference_Faster);

Statistical and practical interpretation of a paired comparison.

Enumeration literals
Inconclusive

The confidence interval supports no practical verdict.

Practically_Equivalent

The full interval lies inside the configured practical threshold.

Contender_Faster

The contender is faster beyond the threshold.

Reference_Faster

The reference is faster beyond the threshold.

Condition_Availability

type Condition_Availability is (Condition_Not_Checked, Condition_Unavailable, Condition_Available);

Whether a host condition probe produced a meaningful answer.

Enumeration literals
Condition_Not_Checked

The operating-conditions policy was disabled.

Condition_Unavailable

The policy was enabled, but no usable and continuous answer was available for the condition.

Condition_Available

A supported detector produced an answer.

Condition_Detector

type Condition_Detector is
  (No_Condition_Detector,
   Darwin_PMSet,
   Darwin_Process_Info,
   Linux_Power_Profiles_Daemon,
   Linux_Platform_Profile,
   Linux_CPU_Thermal_Throttle);

Mechanism that supplied an operating-condition value.

Enumeration literals
No_Condition_Detector

No supported detector supplied a value.

Darwin_PMSet

The macOS pmset command supplied the configured power profile or power source.

Darwin_Process_Info

The macOS NSProcessInfo API supplied a live low-power, process-profile, or thermal value.

Linux_Power_Profiles_Daemon

The Linux power-profiles-daemon D-Bus interface supplied the profile or degradation reason.

Linux_Platform_Profile

A Linux platform_profile sysfs interface supplied the configured profile.

Linux_CPU_Thermal_Throttle

Linux thermal-throttle sysfs counters supplied event or duration totals.

Condition_Pause_Fallback

type Condition_Pause_Fallback is (Fallback_Observe, Fallback_Fail);

What Pause does when its total wait budget is exhausted.

Enumeration literals
Fallback_Observe

Record the expiration and continue.

Fallback_Fail

Raise Operating_Conditions_Unacceptable.

Confidence_Level_Percent

function Confidence_Level_Percent (Result : Comparison) return Confidence_Percentage

Return the confidence level used to analyze this comparison.

Parameters
Result

Completed comparison.

Return value

Central bootstrap interval coverage in percent.

Confidence_Level_Percent

function Confidence_Level_Percent (Result : Measurement) return Confidence_Percentage

Return the confidence level used to analyze this measurement.

Parameters
Result

Completed measurement.

Return value

Central bootstrap interval coverage in percent.

Confidence_Percentage

subtype Confidence_Percentage is Long_Float range 50.0 .. 99.9;

Central coverage of a two-sided bootstrap confidence interval, in percent. The bounds exclude intervals too narrow to be useful and the unattainable 100-percent interval.

Configuration

type Configuration is record
   Warmup_Time                 : Nonnegative_Duration := 0.100;
   Measurement_Time            : Positive_Duration := 0.500;
   Maximum_Sampling_Time       : Nonnegative_Duration := 0.0;
   Samples                     : Sample_Count := 50;
   Minimum_Sample_Time         : Positive_Duration := 0.000_100;
   Maximum_Iterations          : Positive_Iteration_Count := Positive_Iteration_Count'Last;
   Comparison_Batching         : Comparison_Batch_Policy := Equal_Time;
   Shootout_Scheduling         : Shootout_Schedule_Policy := Balanced_Rounds;
   Subtract_Timer_Cost         : Boolean := False;
   Practical_Threshold_Percent : Threshold_Percentage := 1.0;
   Confidence_Level_Percent    : Confidence_Percentage := 95.0;
   Bootstrap_Resamples         : Bootstrap_Resample_Count := 2_000;
   Random_Seed                 : Long_Long_Integer := 1;
   Metrics                     : Metric_Set := Time_Metrics;
   Scheduler_Probe             : Flyology_Scheduler_Probe := null;
   Custom_Metrics              : Custom_Metric_Registry;
   CPU_Quiescence              : CPU_Quiescence_Policy := (others => <>);
   Interference                : Interference_Policy := (others => <>);
   Operating_Conditions        : Operating_Conditions_Policy := Disabled_Operating_Conditions;
   Placement                   : Placement_Policy := (others => <>);
   Host_Lock                   : Host_Lock_Policy := (others => <>);
   Collect_Process_Telemetry   : Boolean := False;
   Progress                    : Progress_Handler := null;
   Progress_Name               : Ada.Strings.Unbounded.Unbounded_String :=
     Ada.Strings.Unbounded.Null_Unbounded_String;
end record;

Controls warmup, calibration, and timed sampling.

Record fields
Warmup_Time

Untimed wall time used to warm code and data.

Measurement_Time

Target wall time across all timed samples.

Maximum_Sampling_Time

Hard wall-time budget for sample collection; zero disables the limit. The harness completes at least ten samples and checks the budget only between complete samples or comparison rounds.

Samples

Number of independently timed samples.

Minimum_Sample_Time

Lower bound for a calibrated sample.

Maximum_Iterations

Safety bound for one sample's batch size.

Comparison_Batching

Whether comparisons default to equal timed slices or one shared logical iteration count.

Shootout_Scheduling

Whether Compare_Many interleaves balanced rounds or collects one complete implementation block at a time.

Subtract_Timer_Cost

Whether to subtract the observed timestamp cost once from every timed sample.

Practical_Threshold_Percent

Smallest relative time change treated as practically meaningful by paired-comparison verdicts.

Confidence_Level_Percent

Central coverage of every bootstrap confidence interval, in percent.

Bootstrap_Resamples

Number of bootstrap distributions drawn for every analyzed measurement or comparison axis.

Random_Seed

Seed used for order shuffling and bootstrap sampling.

Metrics

Axes retained and compared around each timed batch.

Scheduler_Probe

Optional source of cumulative Flyology scheduler counters. The callback runs only outside timed regions.

Custom_Metrics

Bounded custom axes and synchronous run provider.

CPU_Quiescence

Optional sustained low-host-CPU gate performed before clock characterization and workload warmup.

Interference

Optional watch for foreign CPU load arriving after the preflight gate has already passed.

Operating_Conditions

Optional power-profile, thermal-state, transient-profile, and hardware-throttle observation and gating.

Placement

Optional harness-applied placement of the benchmark thread, which also sharpens interference attribution.

Host_Lock

Optional host CPU claim coordinating this run with other tools that follow the same convention.

Collect_Process_Telemetry

Capture process CPU and RSS around each timed sample using untimed native probes. Terminal_Mode enables this.

Progress

Optional callback invoked outside timed regions.

Progress_Name

Human-readable identity passed to Progress. During Compare_Many sampling, the current case name follows this identity.

Contender_First_Samples

function Contender_First_Samples (Result : Comparison) return Natural

Return how many timed pairs ran the contender first.

Parameters
Result

Completed comparison.

Return value

Timed pairs that ran the contender side first.

Contender_Measurement

function Contender_Measurement (Result : Comparison) return Measurement

Return the contender side of a paired comparison.

Parameters
Result

Completed comparison.

Return value

Contender-side measurement using the shared sample schedule.

Contender_Wins

function Contender_Wins (Result : Comparison) return Natural

Return the number of sample pairs won by the contender.

Parameters
Result

Completed comparison.

Return value

Pairs in which the contender took less time.

CPU_Quiescence_Policy

type CPU_Quiescence_Policy (Enabled : Boolean := False) is record
   case Enabled is
      when True =>
         Maximum_Average_CPU_Percent : Percentage := 20.0;
         Maximum_Core_CPU_Percent    : Percentage := 50.0;
         Stable_Time                 : Positive_Duration := 1.0;
         Poll_Interval               : Positive_Duration := 0.100;
         Timeout                     : Positive_Duration := 15.0;
      when False =>
         null;
   end case;
end record;

Controls the optional host CPU preflight gate. When enabled, the harness samples utilization outside timed regions and proceeds only after both the host-wide average and busiest logical CPU remain at or below their limits for Stable_Time. This detects competing CPU work; it does not establish I/O, thermal, frequency, or interrupt quiescence. The gate's settings exist only while it is enabled, so a disabled policy carries no tuning to keep coherent.

Record fields
Enabled

Whether to wait before clock characterization and warmup.

Maximum_Average_CPU_Percent

Largest accepted host-wide busy share.

Maximum_Core_CPU_Percent

Largest accepted busy share on any one logical CPU.

Stable_Time

Continuous accepted interval required before starting.

Poll_Interval

Delay between host CPU counter snapshots. A poll slower than the timeout would let the gate expire unsampled.

Timeout

Maximum wall time spent waiting before raising CPU_Quiescence_Timeout. A timeout shorter than Stable_Time could never be satisfied.

CPU_Quiescence_Timeout

CPU_Quiescence_Timeout : exception;

Raised when enabled CPU quiescence is not observed before its timeout.

Custom_Comparison_Semantics

type Custom_Comparison_Semantics is (Relative_Positive, Absolute);

Comparison method declared by the provider. Relative_Positive rejects any pair containing zero or a negative value instead of silently changing statistical meaning. Absolute always compares signed contender-minus-reference differences.

Enumeration literals
Relative_Positive

Compare paired positive values as ratios.

Absolute

Compare paired signed differences.

Custom_Metric_Attribution

function Custom_Metric_Attribution
  (Result : Measurement; Axis : Custom_Metric_Index) return Metric_Attribution

Return the declared attribution quality.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Caller-declared attribution.

Custom_Metric_Comparison

function Custom_Metric_Comparison
  (Result : Measurement; Axis : Custom_Metric_Index) return Custom_Comparison_Semantics

Return the declared comparison form.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Relative-positive or signed absolute comparison.

Custom_Metric_Count

subtype Custom_Metric_Count is Natural range 0 .. Max_Custom_Metrics;

Number of registered custom axes.

Custom_Metric_Direction

function Custom_Metric_Direction
  (Result : Measurement; Axis : Custom_Metric_Index) return Metric_Direction

Return the declared optimization direction.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Lower, higher, or diagnostic direction.

Custom_Metric_Index

subtype Custom_Metric_Index is Positive range 1 .. Max_Custom_Metrics;

One-based custom axis index in registration order.

Custom_Metric_Is_Primary_Timing

function Custom_Metric_Is_Primary_Timing (Result : Measurement; Axis : Custom_Metric_Index) return Boolean

Test whether an axis is the alternate reported timer.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

True for the one primary alternate timing axis.

Custom_Metric_Name

function Custom_Metric_Name (Result : Measurement; Axis : Custom_Metric_Index) return String

Return a custom axis's stable identity.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Stable custom metric name.

Custom_Metric_Normalization

function Custom_Metric_Normalization
  (Result : Measurement; Axis : Custom_Metric_Index) return Custom_Normalization

Return batch normalization semantics.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Per-batch or per-operation normalization.

Custom_Metric_Registry

type Custom_Metric_Registry is private;

Bounded pre-run descriptors and their transient provider callback.

Custom_Metric_Resolution

function Custom_Metric_Resolution (Result : Measurement; Axis : Custom_Metric_Index) return Long_Float

Return alternate source resolution in its output unit.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Positive primary-timer resolution, otherwise zero.

Custom_Metric_Sample

function Custom_Metric_Sample
  (Result : Measurement; Axis : Custom_Metric_Index; Index : Sample_Index) return Long_Float

Return one collected custom value.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Index

Retained sample index.

Return value

Value in Custom_Metric_Unit units.

Custom_Metric_Sample_Status

function Custom_Metric_Sample_Status
  (Result : Measurement; Axis : Custom_Metric_Index; Index : Sample_Index) return Metric_Availability

Return one retained custom sample's status.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Index

Retained sample index.

Return value

Collected or specific unavailable status.

Custom_Metric_Scope

function Custom_Metric_Scope (Result : Measurement; Axis : Custom_Metric_Index) return Metric_Scope

Return the declared scope.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Caller-declared scope.

Custom_Metric_Semantics

function Custom_Metric_Semantics
  (Result : Measurement; Axis : Custom_Metric_Index) return Custom_Sample_Semantics

Return begin/end sample semantics.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Cumulative, absolute, or completed-elapsed semantics.

Custom_Metric_Statistics

function Custom_Metric_Statistics (Result : Measurement; Axis : Custom_Metric_Index) return Metric_Summary

Return the summary over collected custom values.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Summary whose sample count excludes unavailable values.

Custom_Metric_Status

function Custom_Metric_Status
  (Result : Measurement; Axis : Custom_Metric_Index) return Metric_Availability

Return aggregate custom-axis availability.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Complete, partial, or failure status.

Custom_Metric_Timing_Source

function Custom_Metric_Timing_Source (Result : Measurement; Axis : Custom_Metric_Index) return String

Return alternate timer identity, or empty for an ordinary metric.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Stable timing source identity.

Custom_Metric_Total

function Custom_Metric_Total (Result : Measurement) return Custom_Metric_Count

Number of registered custom axes retained by a measurement.

Parameters
Result

Completed measurement.

Return value

Registered custom axis count.

Custom_Metric_Unit

function Custom_Metric_Unit (Result : Measurement; Axis : Custom_Metric_Index) return String

Return the unit after normalization.

Parameters
Result

Completed measurement.

Axis

Registered custom axis.

Return value

Custom metric unit.

Custom_Metrics

function Custom_Metrics (Registry : Custom_Metric_Registry) return Custom_Metric_Count

Return the number of registered axes.

Parameters
Registry

Registry to inspect.

Return value

Registered custom axis count.

Custom_Normalization

type Custom_Normalization is (Per_Batch, Per_Operation);

Whether a batch value is retained once or divided by its exact logical operation count. Units must describe the resulting value truthfully.

Enumeration literals
Per_Batch

Retain one value for the complete batch.

Per_Operation

Divide by the exact logical-operation count.

Custom_Probe

type Custom_Probe is access procedure (Snapshot : in out Custom_Snapshot);

A single bounded snapshot callback covers every registered custom axis. It runs once immediately before and once immediately after each retained batch. It must not allocate if allocation-free collection is required.

Parameters
Snapshot

Failure-initialized slots populated by the provider.

Custom_Sample_Semantics

type Custom_Sample_Semantics is (Cumulative_Delta, Absolute_Sample, Completed_Elapsed);

Meaning of the two snapshots surrounding one retained batch. Cumulative_Delta requires a nondecreasing signed counter and stores After - Before. Absolute_Sample stores the ending value. Completed_Elapsed also stores the ending value, but identifies it as a synchronized elapsed duration supplied by the measured batch.

Enumeration literals
Cumulative_Delta

Store a checked ending-minus-beginning counter.

Absolute_Sample

Store the explicit ending sample value.

Completed_Elapsed

Store a synchronized finite nonnegative elapsed value returned by measured work.

Custom_Snapshot

type Custom_Snapshot is array (Custom_Metric_Index) of Custom_Value;

Fixed provider snapshot covering every possible registered axis.

Custom_Value

type Custom_Value is record
   Status        : Metric_Availability := Metric_Collected;
   Counter_Value : Long_Long_Integer := 0;
   Sample_Value  : Long_Float := 0.0;
end record;

One caller-provided snapshot slot.

Record fields
Status

Collection outcome; values are ignored unless collected.

Counter_Value

Signed cumulative value for delta semantics.

Sample_Value

Floating sample for absolute or elapsed semantics.

Default_Configuration

Default_Configuration : constant Configuration;

Default configuration for interactive microbenchmark runs.

Direction

function Direction (Axis : Metric_Axis) return Metric_Direction

Return the resource direction used by comparison verdicts.

Parameters
Axis

Selected measurement axis.

Return value

Lower, higher, or diagnostic direction.

Disabled_Operating_Conditions

Disabled_Operating_Conditions : constant Operating_Conditions_Policy;

Inert operating-condition policy whose mode is Disabled.

Do_Not_Optimize

generic
   type Element is private;
procedure Do_Not_Optimize (Value : in out Element)

Make a value visible to an opaque compiler barrier. Place this outside a timed nanosecond operation because the barrier is an out-of-line call.

Generic formal parameters
Element
Parameters
Value

Input or output value that the optimizer must retain.

Environment

function Environment (Result : Measurement) return Environment_Report

Return what the harness observed about its host during collection. Nothing in this report has been applied to any reported statistic: the harness records the conditions and leaves the samples alone.

Parameters
Result

Completed measurement.

Return value

Environment observations retained for the run.

Environment_Report

type Environment_Report is record
   Watched                  : Boolean := False;
   Attribution              : Interference_Source := Host_Wide;
   Windows                  : Natural := 0;
   Observed_Samples         : Natural := 0;
   Mean_Foreign_CPU_Percent : Long_Float := 0.0;
   Peak_Foreign_CPU_Percent : Long_Float := 0.0;
   Contaminated_Samples     : Natural := 0;
   Retaken_Samples          : Natural := 0;
   Pauses                   : Natural := 0;
   Paused_Nanoseconds       : Long_Float := 0.0;
   Budget_Exhausted         : Boolean := False;
   Placement                : Placement_Outcome := Placement_Not_Requested;
   Watched_CPUs             : Natural := 0;
   Attribution_Diluted      : Boolean := False;
   Host_Lock                : Host_Lock_Outcome := Lock_Not_Requested;
   Conditions_Checked       : Boolean := False;
   Profile_Availability     : Condition_Availability := Condition_Not_Checked;
   Profile_Detector         : Condition_Detector := No_Condition_Detector;
   Initial_Profile          : Performance_Profile := Profile_Unknown;
   Final_Profile            : Performance_Profile := Profile_Unknown;
   Initial_Power_Source     : Host_Power_Source := Power_Source_Unknown;
   Final_Power_Source       : Host_Power_Source := Power_Source_Unknown;
   Profile_Changes          : Natural := 0;
   Low_Power_Availability   : Condition_Availability := Condition_Not_Checked;
   Low_Power_Detector       : Condition_Detector := No_Condition_Detector;
   Initial_Low_Power_Mode   : Low_Power_Mode_State := Low_Power_Mode_Unknown;
   Worst_Low_Power_Mode     : Low_Power_Mode_State := Low_Power_Mode_Unknown;
   Final_Low_Power_Mode     : Low_Power_Mode_State := Low_Power_Mode_Unknown;
   Process_Profile_Avail    : Condition_Availability := Condition_Not_Checked;
   Process_Profile_Detector : Condition_Detector := No_Condition_Detector;
   Initial_Process_Profile  : Process_Performance_Profile := Process_Profile_Unknown;
   Final_Process_Profile    : Process_Performance_Profile := Process_Profile_Unknown;
   Process_Profile_Changes  : Natural := 0;
   Thermal_Availability     : Condition_Availability := Condition_Not_Checked;
   Thermal_Detector         : Condition_Detector := No_Condition_Detector;
   Initial_Thermal_State    : Host_Thermal_State := Thermal_State_Unknown;
   Worst_Thermal_State      : Host_Thermal_State := Thermal_State_Unknown;
   Final_Thermal_State      : Host_Thermal_State := Thermal_State_Unknown;
   Degradation_Availability : Condition_Availability := Condition_Not_Checked;
   Initial_Degradation      : Performance_Degradation := Degradation_Unknown;
   Worst_Degradation        : Performance_Degradation := Degradation_Unknown;
   Final_Degradation        : Performance_Degradation := Degradation_Unknown;
   Throttle_Availability    : Condition_Availability := Condition_Not_Checked;
   Throttle_Time_Avail      : Condition_Availability := Condition_Not_Checked;
   Throttle_Detector        : Condition_Detector := No_Condition_Detector;
   Throttle_Events          : Interfaces.Unsigned_64 := 0;
   Throttle_Milliseconds    : Interfaces.Unsigned_64 := 0;
   Condition_Windows        : Natural := 0;
   Affected_Units           : Natural := 0;
   Recollected_Units        : Natural := 0;
   Condition_Pauses         : Natural := 0;
   Condition_Paused_NS      : Long_Float := 0.0;
   Condition_Budget_Expired : Boolean := False;
   Condition_Fallback_Used  : Boolean := False;
end record;

What the harness observed about its host while collecting one measurement. Every field is a record of conditions, never a correction: no reported statistic is adjusted by any of it.

Record fields
Watched

Whether the watch produced at least one usable window.

Attribution

How foreign load was attributed.

Windows

Number of closed observation windows.

Observed_Samples

Retained samples covered by a closed window. For a multi-way shootout this counts every case, so it exceeds any one case's sample count.

Mean_Foreign_CPU_Percent

Mean foreign share across those windows, including windows whose samples were discarded and collected again: it describes the host during the run, not only the data kept.

Peak_Foreign_CPU_Percent

Largest foreign share in any window.

Contaminated_Samples

Retained samples collected during a window that exceeded the configured limit, out of Observed_Samples.

Retaken_Samples

Samples discarded and collected again.

Pauses

Number of times collection was suspended.

Paused_Nanoseconds

Total wall time spent suspended.

Budget_Exhausted

Whether a retake or pause budget ran out, after which the run continued under Observe.

Placement

Placement outcome for the benchmark thread.

Watched_CPUs

Logical CPUs in the observed set, zero when the attribution is host-wide.

Attribution_Diluted

Whether core-scoped attribution was abandoned mid-run. Placement binds only the calling thread, so another thread of this process can run on a watched CPU, where its time is indistinguishable from foreign load. When those threads consume more of the watched capacity than the configured foreign limit, the core-scoped answer can no longer address the question the limit asks, and the run continues host-wide instead of reporting its own runtime as interference.

Host_Lock

Host CPU claim outcome.

Conditions_Checked

Whether operating-condition observation was enabled.

Profile_Availability

Whether a configured host profile was observed.

Profile_Detector

Provider for the configured host profile.

Initial_Profile

Profile before warmup and calibration.

Final_Profile

Profile at the last completed condition boundary.

Initial_Power_Source

Power source before warmup and calibration.

Final_Power_Source

Power source at the last completed condition boundary.

Profile_Changes

Number of observed configured-profile transitions.

Low_Power_Availability

Whether macOS low-power mode was observed.

Low_Power_Detector

Provider for low-power mode.

Initial_Low_Power_Mode

Low-power mode before warmup and calibration.

Worst_Low_Power_Mode

Whether low-power mode was enabled at any boundary.

Final_Low_Power_Mode

Low-power mode at the last completed condition boundary.

Process_Profile_Avail

Whether the macOS process performance profile was observed.

Process_Profile_Detector

Provider for the process performance profile.

Initial_Process_Profile

Process profile before warmup and calibration.

Final_Process_Profile

Process profile at the last completed condition boundary.

Process_Profile_Changes

Number of observed process-profile transitions.

Thermal_Availability

Whether a live macOS thermal-pressure state was observed.

Thermal_Detector

Provider for live thermal pressure.

Initial_Thermal_State

Thermal pressure before warmup and calibration.

Worst_Thermal_State

Highest thermal pressure observed at a boundary.

Final_Thermal_State

Thermal pressure at the last completed condition boundary.

Degradation_Availability

Whether Linux PPD degradation was observed.

Initial_Degradation

PPD degradation before warmup and calibration.

Worst_Degradation

Most recently observed nonempty PPD degradation reason; otherwise Not_Degraded when the detector reported no degradation, or Degradation_Unknown when it never supplied a reason.

Final_Degradation

PPD degradation at the last completed condition boundary.

Throttle_Availability

Whether Linux throttle-event counters remained continuously observable; unavailable also records continuity loss after detection.

Throttle_Time_Avail

Whether Linux cumulative throttle-time counters remained continuously observable; unavailable also records continuity loss after detection.

Throttle_Detector

Provider for Linux throttle counters.

Throttle_Events

Aggregate counter increase across observed core and package objects.

Throttle_Milliseconds

Aggregate cumulative-throttle-time increase across those objects.

Condition_Windows

Number of benchmark windows checked for condition changes.

Affected_Units

Samples, comparison pairs, or balanced rounds observed under unacceptable conditions, including units later discarded and recollected after recovery.

Recollected_Units

Units discarded and collected again after condition recovery.

Condition_Pauses

Number of waits for acceptable, stable conditions.

Condition_Paused_NS

Total wall time in operating-condition waits.

Condition_Budget_Expired

Whether an operating-condition pause budget ran out.

Condition_Fallback_Used

Whether pause timeout fell back to Observe or Fail.

Fail

function Fail
  (Require_Nonreduced_Profile : Boolean := True;
   Require_Profile_Detection  : Boolean := False;
   Maximum_Thermal_State      : Thermal_State_Threshold := Thermal_State_Fair;
   Require_Thermal_Detection  : Boolean := False;
   Window                     : Positive_Duration := 0.050) return Operating_Conditions_Policy

Construct a policy that raises at an unacceptable-condition boundary.

Parameters
Require_Nonreduced_Profile

Whether a reduced configured profile or enabled low-power mode is unacceptable.

Require_Profile_Detection

Whether missing configured-profile evidence is unacceptable.

Maximum_Thermal_State

Highest acceptable observed thermal state.

Require_Thermal_Detection

Whether absence of every supported thermal-state, throttle-counter, and degradation signal is unacceptable.

Window

Minimum target duration for each complete collection window.

Return value

A failing operating-condition policy.

Flyology_Scheduler_Metrics

Flyology_Scheduler_Metrics : constant Metric_Set :=
  [Flyology_Dispatches .. Flyology_Migrations => True, others => False];

Counters supplied through Scheduler_Probe.

Flyology_Scheduler_Probe

type Flyology_Scheduler_Probe is access procedure (Snapshot : out Flyology_Scheduler_Snapshot);

Capture cumulative Flyology scheduler counters outside a timed region.

Parameters
Snapshot

Caller-populated cumulative counter snapshot.

Flyology_Scheduler_Snapshot

type Flyology_Scheduler_Snapshot is record
   Available      : Boolean := False;
   Dispatches     : Interfaces.Unsigned_64 := 0;
   Poll_Batches   : Interfaces.Unsigned_64 := 0;
   Poll_Events    : Interfaces.Unsigned_64 := 0;
   Wakeups        : Interfaces.Unsigned_64 := 0;
   Migrations_In  : Interfaces.Unsigned_64 := 0;
   Migrations_Out : Interfaces.Unsigned_64 := 0;
end record;

Cumulative Flyology scheduler counters supplied outside timed regions. A caller can sum one or more Flyology.Observability.Group_Snapshot values. Counters must be process-lifetime monotonic values.

Record fields
Available

Whether the snapshot contains usable counters.

Dispatches

Cumulative fiber dispatches.

Poll_Batches

Cumulative event-poller batches.

Poll_Events

Cumulative host events delivered.

Wakeups

Cumulative task wake requests.

Migrations_In

Cumulative migrations entering observed groups.

Migrations_Out

Cumulative migrations leaving observed groups.

Geometric_Mean_Speedup

function Geometric_Mean_Speedup (Result : Comparison) return Long_Float

Return the geometric mean paired speedup. A value greater than one means the contender is faster.

Parameters
Result

Completed comparison.

Return value

Geometric mean of paired reference-time/contender-time ratios.

Host_Lock_Outcome

type Host_Lock_Outcome is
  (Lock_Not_Requested, Lock_Held, Lock_Namespace_Scoped, Lock_Busy, Lock_Path_Unusable);

Outcome of the optional host CPU claim.

Enumeration literals
Lock_Not_Requested

The policy was disabled.

Lock_Held

The claim was taken and covers the machine as far as can be determined from inside it.

Lock_Namespace_Scoped

The claim was taken, but the path resolves inside a private mount namespace, so it excludes only processes sharing that namespace.

Lock_Busy

A conflicting holder was still present at the timeout.

Lock_Path_Unusable

The claim path could not be opened.

Host_Lock_Policy

type Host_Lock_Policy (Enabled : Boolean := False) is record
   case Enabled is
      when True =>
         Path                  : Ada.Strings.Unbounded.Unbounded_String :=
           Ada.Strings.Unbounded.Null_Unbounded_String;
         Timeout               : Nonnegative_Duration := 30.0;
         Poll_Interval         : Positive_Duration := 0.250;
         Require_Machine_Scope : Boolean := False;
      when False =>
         null;
   end case;
end record;

Controls the optional host CPU claim held for the duration of a run. The claim coordinates with other tools that follow the same convention, including load generators and profilers, not with arbitrary CPU work. Two harnesses that both pause on interference would otherwise oscillate against each other indefinitely, each being the other's foreign load.

Record fields
Enabled

Whether to claim host CPU capacity for the run.

Path

Claim path, or empty for the convention default.

Timeout

Longest wait for a conflicting holder to finish.

Poll_Interval

Delay between claim attempts while waiting.

Require_Machine_Scope

Whether an unusable path, an exhausted timeout, or a privately mounted path is an error rather than a recorded degradation. A silently unserialized run is worse than a failed one.

Host_Lock_Unavailable

Host_Lock_Unavailable : exception;

Raised when a required host CPU claim could not be established.

Host_Power_Source

type Host_Power_Source is (Power_Source_Unknown, Battery_Power, External_Power);

Power source reported by the host.

Enumeration literals
Power_Source_Unknown

No supported detector supplied a power source.

Battery_Power

The host is using battery power.

External_Power

The host is using external power.

Host_Thermal_State

type Host_Thermal_State is
  (Thermal_State_Unknown,
   Thermal_State_Nominal,
   Thermal_State_Fair,
   Thermal_State_Serious,
   Thermal_State_Critical);

Thermal-pressure state reported by the host operating system.

Enumeration literals
Thermal_State_Unknown

No supported detector supplied a thermal state.

Thermal_State_Nominal

Thermal pressure is nominal.

Thermal_State_Fair

Thermal pressure is elevated but fair.

Thermal_State_Serious

Thermal pressure is serious.

Thermal_State_Critical

Thermal pressure is critical.

Interference_Policy

type Interference_Policy
  (Enabled  : Boolean := False;
   Response : Interference_Response := Observe)
is record
   case Enabled is
      when True =>
         Maximum_Foreign_CPU_Percent : Percentage := 10.0;
         Window                      : Positive_Duration := 0.050;
         Maximum_Retakes             : Natural := 25;
         case Response is
            when Observe | Retake =>
               null;
            when Pause =>
               Settle_Time        : Positive_Duration := 0.250;
               Maximum_Pause_Time : Positive_Duration := 30.0;
               Rewarm_Time        : Nonnegative_Duration := 0.050;
         end case;
      when False =>
         null;
   end case;
end record;

Controls the optional mid-run host interference watch. Foreign CPU load is estimated between timed samples, never inside them, over windows of at least Window wall time. Windows are whole numbers of samples, pairs, or balanced rounds, so a response never splits a comparison's pairing.

Host CPU counters are tick-based on both platforms, so a window shorter than one tick cannot produce a trustworthy estimate. A closed window that did not reach Window is recorded but never triggers a response.

This detects competing CPU work. It does not detect contention for shared cache or memory bandwidth, which perturb a measurement without moving any CPU busy counter. The watch's settings exist only while it is enabled, and the three pause settings exist only under Pause. Observe and Retake both share the retake budget, which bounds how many windows one run may redo.

Record fields
Enabled

Whether to watch for foreign load during collection.

Response

What to do when a window exceeds the limit.

Maximum_Foreign_CPU_Percent

Largest accepted foreign share of the machine's total CPU capacity.

Window

Smallest wall interval an estimate is trusted over.

Maximum_Retakes

Total sample retakes allowed for one run.

Settle_Time

Continuous accepted interval required before a paused run resumes.

Maximum_Pause_Time

Total wall time one run may spend paused. Paused time is excluded from Maximum_Sampling_Time. A budget smaller than one settle interval could never resume a run.

Rewarm_Time

Untimed warmup executed after a pause, before timed collection resumes. A resumed run is otherwise cold and its first samples would be the outliers the pause was meant to avoid.

Interference_Response

type Interference_Response is (Observe, Retake, Pause);

Response applied when foreign CPU work is observed during collection. The preflight gate only proves the host was quiet before warmup; this policy decides what happens when it stops being quiet afterwards.

Enumeration literals
Observe

Retain every sample and report what was seen. Nothing is discarded, so the raw distribution stays exactly as collected.

Retake

Discard the contaminated window and collect it again, bounded by Maximum_Retakes.

Pause

Wait for foreign load to settle, re-warm the workload, and resume, bounded by Maximum_Pause_Time.

Interference_Source

type Interference_Source is (Host_Wide, Core_Scoped);

How foreign CPU load was attributed.

Enumeration literals
Host_Wide

Foreign load is the host's busy time minus this process's own CPU time. Available on every supported platform.

Core_Scoped

Foreign load is measured on the claimed logical CPUs and their SMT siblings. Requires strict placement, so Linux only, and holds only while this process runs one CPU-consuming thread; see Environment_Report.Attribution_Diluted.

Iteration_Count

type Iteration_Count is range 0 .. Long_Long_Integer'Last;

Number of logical benchmark operations. Zero is useful for caller-owned counters; a measured batch always contains at least one iteration.

Iterations_Per_Sample

function Iterations_Per_Sample (Result : Measurement) return Iteration_Count

Return the calibrated logical operation count in each timed sample.

Parameters
Result

Completed measurement.

Return value

Logical operations in each raw sample.

Lag_One_Correlation

function Lag_One_Correlation (Result : Comparison) return Long_Float

Return lag-one correlation of paired log-speedup samples.

Parameters
Result

Completed comparison.

Return value

Lag-one sample correlation, or zero when undefined.

Linux_Hardware_Metrics

Linux_Hardware_Metrics     : constant Metric_Set := [CPU_Cycles .. Branch_Misses => True, others => False];

Linux perf counters covering the calling pthread and the native tasks it creates afterwards. Axes remain unavailable when the kernel, host PMU, or perf permissions reject an event; Metric_Status reports which.

Low_Power_Mode_State

type Low_Power_Mode_State is (Low_Power_Mode_Unknown, Low_Power_Mode_Disabled, Low_Power_Mode_Enabled);

Current low-power-mode setting. This is deliberately separate from the configured performance profile. It is not an inference from idle DVFS.

Enumeration literals
Low_Power_Mode_Unknown

No supported detector supplied the setting.

Low_Power_Mode_Disabled

Low-power mode is disabled.

Low_Power_Mode_Enabled

Low-power mode is enabled.

Max_Comparison_Cases

Max_Comparison_Cases : constant := 16;

Maximum number of implementations in one multi-way comparison.

Max_Custom_Metric_Name_Length

Max_Custom_Metric_Name_Length : constant := 48;

Maximum custom metric identity length.

Max_Custom_Metric_Unit_Length

Max_Custom_Metric_Unit_Length : constant := 24;

Maximum custom metric unit length.

Max_Custom_Metrics

Max_Custom_Metrics            : constant := 8;

Bounded caller-defined measurement axes. Registration is complete before a run starts; collection performs no allocation.

Max_Timing_Source_Name_Length

Max_Timing_Source_Name_Length : constant := 48;

Maximum alternate timing source identity length.

Maximum_Nanoseconds

function Maximum_Nanoseconds (Result : Measurement) return Long_Float

Return the slowest retained per-operation sample.

Parameters
Result

Completed measurement.

Return value

Slowest per-operation sample in nanoseconds.

Mean_Confidence_High_Nanoseconds

function Mean_Confidence_High_Nanoseconds (Result : Measurement) return Long_Float

Return the upper endpoint of the bootstrap mean interval.

Parameters
Result

Completed measurement.

Return value

Upper endpoint of the deterministic bootstrap mean interval.

Mean_Confidence_Low_Nanoseconds

function Mean_Confidence_Low_Nanoseconds (Result : Measurement) return Long_Float

Return the lower endpoint of the bootstrap mean interval.

Parameters
Result

Completed measurement.

Return value

Lower endpoint of the deterministic bootstrap mean interval.

Mean_Nanoseconds

function Mean_Nanoseconds (Result : Measurement) return Long_Float

Return the arithmetic mean of the retained per-operation samples.

Parameters
Result

Completed measurement.

Return value

Arithmetic mean per operation in nanoseconds.

Mean_Time_Difference_Nanoseconds

function Mean_Time_Difference_Nanoseconds (Result : Comparison) return Long_Float

Return the mean paired time difference. A negative value means the contender took less time.

Parameters
Result

Completed comparison.

Return value

Arithmetic mean of contender-time minus reference-time pairs.

Measure

generic
   with procedure Operation;
procedure Measure (Config : Configuration := Default_Configuration; Result : out Measurement)

Warm, calibrate, and measure one statically bound operation.

Generic formal parameters
Operation
Parameters
Config

Measurement policy.

Result

Collected raw samples and summary statistics.

Raised exceptions
Constraint_Error

Config requests more than the bounded bootstrap analysis work.

Measure_Batched

generic
   with procedure Batch (Iterations : Iteration_Count);
procedure Measure_Batched (Config : Configuration := Default_Configuration; Result : out Measurement)

Warm, calibrate, and measure a caller-controlled batch. The caller must perform exactly Iterations logical operations before returning.

Generic formal parameters
Batch
Parameters
Config

Measurement policy.

Result

Collected raw samples and summary statistics.

Raised exceptions
Constraint_Error

Config requests more than the bounded bootstrap analysis work.

Measure_Result_Batched

generic
   type Element is private;
   with procedure Batch (Iterations : Iteration_Count; Value : out Element);
procedure Measure_Result_Batched
  (Config : Configuration := Default_Configuration; Result : out Measurement)

Measure a result-producing batch and pass its result to an opaque barrier after the ending timestamp. This avoids charging barrier cost to the measured operation.

Generic formal parameters
Element
Batch
Parameters
Config

Measurement policy.

Result

Collected raw samples and summary statistics.

Raised exceptions
Constraint_Error

Config requests more than the bounded bootstrap analysis work.

Measure_With_Hooks

generic
   with procedure Setup;
   with procedure Operation;
   with procedure Teardown;
procedure Measure_With_Hooks (Config : Configuration := Default_Configuration; Result : out Measurement)

Measure an operation with per-sample setup and teardown hooks. Teardown also runs when the measured operation raises, before the exception is propagated.

Generic formal parameters
Setup
Operation
Teardown
Parameters
Config

Measurement policy.

Result

Collected raw samples and summary statistics.

Raised exceptions
Constraint_Error

Config requests more than the bounded bootstrap analysis work.

Measurement

type Measurement is private;

Raw samples and summary statistics from one benchmark measurement.

Median_Absolute_Deviation_Nanoseconds

function Median_Absolute_Deviation_Nanoseconds (Result : Measurement) return Long_Float

Return the median absolute deviation of per-operation time.

Parameters
Result

Completed measurement.

Return value

Median absolute deviation in nanoseconds.

Median_Batch_Nanoseconds

function Median_Batch_Nanoseconds (Result : Measurement) return Long_Float

Return the elapsed duration of one calibrated timed batch.

Parameters
Result

Completed measurement.

Return value

Median sample batch duration in nanoseconds.

Median_Nanoseconds

function Median_Nanoseconds (Result : Measurement) return Long_Float

Return the median of the retained per-operation samples.

Parameters
Result

Completed measurement.

Return value

Median per operation in nanoseconds.

Median_Speedup

function Median_Speedup (Result : Comparison) return Long_Float

Return the median paired speedup. A value greater than one means the contender is faster.

Parameters
Result

Completed comparison.

Return value

Median paired reference-time/contender-time ratio.

Median_Timer_Cost_Nanoseconds

function Median_Timer_Cost_Nanoseconds (Result : Measurement) return Long_Float

Return the median adjacent-clock interval observed at startup.

Parameters
Result

Completed measurement.

Return value

Median clock-read interval in nanoseconds.

Metric_Attribution

type Metric_Attribution is
  (Exact_Window,
   Same_Native_Thread_Window,
   Native_Task_Tree_Window,
   Shared_Process_Window,
   Shared_Runtime_Window,
   Unattributable);

Quality of the boundary used to attribute a collected metric. This is deliberately separate from Metric_Availability: a process-wide value can be successfully collected while also including concurrent work outside the operation being observed.

Enumeration literals
Exact_Window

The value belongs to the measured wall-clock window.

Same_Native_Thread_Window

The value covers one native thread and is valid only when both boundaries execute on that thread.

Native_Task_Tree_Window

The value covers one native thread and native children inherited by its counter group.

Shared_Process_Window

The value covers the complete process and can include unrelated or concurrent work.

Shared_Runtime_Window

The value covers a Flyology runtime or execution-group boundary rather than one operation exclusively.

Unattributable

No valid attribution survived the two boundaries.

Metric_Availability

type Metric_Availability is
  (Metric_Not_Requested,
   Metric_Collected,
   Unsupported_Platform,
   Permission_Denied,
   Unsupported_Event,
   Counter_Resources_Unavailable,
   Probe_Failed,
   Metric_Partially_Collected,
   …,
   Conversion_Overflow);

Collection state retained for each requested metric.

Enumeration literals
Metric_Not_Requested

The configuration did not select the axis.

Metric_Collected

Every retained sample contains a value.

Unsupported_Platform

The operating system has no backend.

Permission_Denied

The operating system rejected probe access.

Unsupported_Event

The host exposes no counter for the event, either because it has no performance monitoring unit or because that unit does not implement this event.

Counter_Resources_Unavailable

The event could not be scheduled or allocated.

Probe_Failed

A native snapshot, counter control, or read failed, or the kernel rejected the requested counter attributes.

Metric_Partially_Collected

At least one retained sample contains a value, but one or more retained samples do not.

Counter_Reset

A custom cumulative ending value was below its beginning value.

Invalid_Value

A custom value was NaN, infinite, or a negative completed elapsed value.

Conversion_Overflow

Custom delta or unit conversion overflowed.

Metric_Available

function Metric_Available (Result : Measurement; Axis : Metric_Axis) return Boolean

Test whether complete samples exist for one axis.

Parameters
Result

Completed measurement.

Axis

Requested measurement axis.

Return value

True when every retained sample has a value.

Metric_Axis

type Metric_Axis is
  (Wall_Time,
   Process_CPU_Time,
   Thread_CPU_Time,
   Process_RSS,
   Process_RSS_Change,
   Minor_Page_Faults,
   Major_Page_Faults,
   Voluntary_Context_Switches,
   …,
   Flyology_Migrations);

One independently sampled measurement axis. Wall_Time remains the calibration and collection-budget clock even when it is not selected for reporting. Process counters include every thread in the benchmark process; thread CPU covers only the executing pthread. Linux PMU counters additionally inherit into child native tasks created after counter initialization. Flyology counters require Scheduler_Probe.

Enumeration literals
Wall_Time

Monotonic elapsed nanoseconds per logical operation.

Process_CPU_Time

User plus system CPU nanoseconds per operation across the process.

Thread_CPU_Time

User plus system CPU nanoseconds per operation on the calling native pthread.

Process_RSS

Resident bytes observed after the batch.

Process_RSS_Change

Resident-byte change per logical operation.

Minor_Page_Faults

Minor faults per logical operation.

Major_Page_Faults

Major faults per logical operation.

Voluntary_Context_Switches

Voluntary switches per operation.

Involuntary_Context_Switches

Involuntary switches per operation.

Disk_Read_Bytes

Storage bytes read per logical operation.

Disk_Written_Bytes

Storage bytes written per logical operation.

Filesystem_Input_Operations

Filesystem input operations per logical operation.

Filesystem_Output_Operations

Filesystem output operations per logical operation.

CPU_Cycles

Linux perf CPU cycles per logical operation.

Instructions

Linux perf retired instructions per operation.

Instructions_Per_Cycle

Linux perf instructions divided by cycles.

Cache_Misses

Linux perf cache misses per logical operation.

Branches

Linux perf branch instructions per logical operation.

Branch_Misses

Linux perf branch misses per logical operation.

Flyology_Dispatches

Scheduler dispatches per logical operation.

Flyology_Poll_Batches

Poller batches per logical operation.

Flyology_Poll_Events

Delivered poll events per logical operation.

Flyology_Wakeups

Wake requests per logical operation.

Flyology_Migrations

Inbound plus outbound migrations per logical operation.

Metric_Comparison_Method

type Metric_Comparison_Method is (Relative_Ratio, Absolute_Difference);

Statistical form used to compare one metric.

Enumeration literals
Relative_Ratio

Paired positive samples use ratios and percent.

Absolute_Difference

Signed or zero-valued samples use differences.

Metric_Comparison_Result

type Metric_Comparison_Result is record
   Available        : Boolean := False;
   Method           : Metric_Comparison_Method := Absolute_Difference;
   Reference_Median : Long_Float := 0.0;
   Contender_Median : Long_Float := 0.0;
   Change           : Long_Float := 0.0;
   Confidence_Low   : Long_Float := 0.0;
   Confidence_High  : Long_Float := 0.0;
   Verdict          : Metric_Verdict := Metric_Inconclusive;
end record;

Paired comparison summary for one metric axis. Change is contender relative percent for Relative_Ratio and contender minus reference in Metric_Unit units for Absolute_Difference.

Record fields
Available

Whether both sides retained complete axis samples.

Method

Relative ratio or signed absolute difference.

Reference_Median

Reference median in Metric_Unit units.

Contender_Median

Contender median in Metric_Unit units.

Change

Point estimate of contender change.

Confidence_Low

Lower endpoint in the same change units.

Confidence_High

Upper endpoint in the same change units.

Verdict

Directional, equivalent, inconclusive, or diagnostic.

Metric_Direction

type Metric_Direction is (Lower_Is_Better, Higher_Is_Better, Diagnostic);

Whether a smaller or larger value is normally resource-favorable. Diagnostic metrics receive no better/worse verdict.

Enumeration literals
Lower_Is_Better

Smaller resource consumption is favorable.

Higher_Is_Better

Larger efficiency is favorable.

Diagnostic

No general optimization direction is asserted.

Metric_Name

function Metric_Name (Axis : Metric_Axis) return String

Return a stable human-readable metric name.

Parameters
Axis

Selected measurement axis.

Return value

Stable display name used by reporters.

Metric_Requested

function Metric_Requested (Result : Measurement; Axis : Metric_Axis) return Boolean

Test whether an axis was selected for one measurement.

Parameters
Result

Completed measurement.

Axis

Measurement axis.

Return value

True when the configuration requested the axis.

Metric_Sample

function Metric_Sample (Result : Measurement; Axis : Metric_Axis; Index : Sample_Index) return Long_Float

Return one retained metric sample.

Parameters
Result

Completed measurement.

Axis

Requested measurement axis.

Index

One-based retained sample index.

Return value

Value in Metric_Unit units.

Raised exceptions
Constraint_Error

If the axis is unavailable or Index exceeds the retained sample count.

Metric_Scope

type Metric_Scope is
  (Batch_Wall_Clock,
   Benchmark_Process,
   Current_Native_Thread,
   Native_Task_Tree,
   Flyology_Runtime,
   Caller_Defined_Window,
   Device_Or_Accelerator,
   Simulated_Clock);

Attribution boundary of a metric.

Enumeration literals
Batch_Wall_Clock

Monotonic elapsed time surrounding the batch.

Benchmark_Process

All native threads in the process.

Current_Native_Thread

Only the pthread executing the probe.

Native_Task_Tree

The executing pthread and child native tasks or processes it creates after counter initialization.

Flyology_Runtime

Counters supplied by Flyology observability.

Caller_Defined_Window

Scope described by the provider contract.

Device_Or_Accelerator

Synchronized external execution scope.

Simulated_Clock

Deterministic or simulated clock scope.

Metric_Set

type Metric_Set is array (Metric_Axis) of Boolean;

Set of axes requested for one run.

Metric_Statistics

function Metric_Statistics (Result : Measurement; Axis : Metric_Axis) return Metric_Summary

Return the distribution summary for one axis.

Parameters
Result

Completed measurement.

Axis

Requested measurement axis.

Return value

Available or unavailable summary.

Metric_Status

function Metric_Status (Result : Measurement; Axis : Metric_Axis) return Metric_Availability

Return why an axis is available, absent, or unusable.

Parameters
Result

Completed measurement.

Axis

Measurement axis.

Return value

Retained collection state with a specific failure class.

Metric_Summary

type Metric_Summary is record
   Available       : Boolean := False;
   Samples         : Natural := 0;
   Minimum         : Long_Float := 0.0;
   Maximum         : Long_Float := 0.0;
   Mean            : Long_Float := 0.0;
   Median          : Long_Float := 0.0;
   P95             : Long_Float := 0.0;
   P99             : Long_Float := 0.0;
   Confidence_Low  : Long_Float := 0.0;
   Confidence_High : Long_Float := 0.0;
end record;

Distribution summary for one requested measurement axis.

Record fields
Available

Whether at least one retained sample has this axis.

Samples

Number of retained metric samples.

Minimum

Smallest sample in Metric_Unit units.

Maximum

Largest sample.

Mean

Arithmetic sample mean.

Median

Sample median.

P95

Ninety-fifth percentile.

P99

Ninety-ninth percentile.

Confidence_Low

Lower endpoint of the bootstrap mean interval.

Confidence_High

Upper endpoint of the bootstrap mean interval.

Metric_Unit

function Metric_Unit (Axis : Metric_Axis) return String

Return the metric's human-readable unit.

Parameters
Axis

Selected measurement axis.

Return value

Unit string, including per-operation normalization.

Metric_Verdict

type Metric_Verdict is
  (Metric_Inconclusive,
   Metric_Practically_Equivalent,
   Contender_Better,
   Reference_Better,
   Metric_Diagnostic);

Resource-oriented result of a metric comparison.

Enumeration literals
Metric_Inconclusive

The interval establishes no direction.

Metric_Practically_Equivalent

A relative interval lies inside the configured practical threshold.

Contender_Better

The contender uses less resource or has greater efficiency, according to the metric direction.

Reference_Better

The reference is favorable.

Metric_Diagnostic

The axis has no general optimization direction.

Minimum_Nanoseconds

function Minimum_Nanoseconds (Result : Measurement) return Long_Float

Return the fastest retained per-operation sample.

Parameters
Result

Completed measurement.

Return value

Fastest per-operation sample in nanoseconds.

Mode

function Mode (Policy : Operating_Conditions_Policy) return Operating_Conditions_Mode

Return a policy's explicit mode.

Parameters
Policy

Operating-condition policy to inspect.

Return value

Disabled, Observe, Pause, or Fail.

Multi_Comparison

type Multi_Comparison is private;

Measurements and paired results for several implementations measured in common, position-balanced rounds. Case one is the reference.

Nonnegative_Duration

subtype Nonnegative_Duration is Duration range 0.0 .. Duration'Last;

Wall-time budget that may legitimately be zero, either because a stage is skipped or because a limit is disabled.

Observe

function Observe
  (Require_Nonreduced_Profile : Boolean := True;
   Require_Profile_Detection  : Boolean := False;
   Maximum_Thermal_State      : Thermal_State_Threshold := Thermal_State_Fair;
   Require_Thermal_Detection  : Boolean := False;
   Window                     : Positive_Duration := 0.050) return Operating_Conditions_Policy

Construct a policy that records unacceptable conditions and continues.

Parameters
Require_Nonreduced_Profile

Whether a reduced configured profile or enabled low-power mode is unacceptable.

Require_Profile_Detection

Whether missing configured-profile evidence is unacceptable.

Maximum_Thermal_State

Highest acceptable observed thermal state.

Require_Thermal_Detection

Whether absence of every supported thermal-state, throttle-counter, and degradation signal is unacceptable.

Window

Minimum target duration for each complete collection window.

Return value

An observing operating-condition policy.

Observed_Clock_Resolution_Nanoseconds

function Observed_Clock_Resolution_Nanoseconds (Result : Measurement) return Long_Float

Return the smallest positive clock step observed during characterization.

Parameters
Result

Completed measurement.

Return value

Observed clock step in nanoseconds, or zero if none was observed.

Operating_Conditions_Mode

type Operating_Conditions_Mode is (Disabled, Observe, Pause, Fail);

Operating-condition policy mode.

Enumeration literals
Disabled

Do not probe or gate operating conditions.

Observe

Continue and retain the observed evidence.

Pause

Wait for acceptable conditions before continuing, subject to the total pause budget and its explicitly selected expiration action.

Fail

Raise Operating_Conditions_Unacceptable at the next condition check boundary.

Operating_Conditions_Policy

type Operating_Conditions_Policy is private;

Controls operating-condition observation and gating. The disabled constant and the Observe, Pause, and Fail constructors select one of the four explicit modes; clients cannot assemble a policy with an implicit response. Probes run only outside timed regions. A Pause response preserves sample/pair/round atomicity: after an unacceptable window it waits for a continuous stable interval, rewarms, then recollects the complete window. If the pause budget expires, Fallback_Observe retains the original affected window while Fallback_Fail raises Operating_Conditions_Unacceptable.

An unavailable detector result never establishes a clean host. Require_Profile_Detection and Require_Thermal_Detection make either absence unacceptable instead of allowing the policy to continue.

Operating_Conditions_Unacceptable

Operating_Conditions_Unacceptable : exception;

Raised when the operating-condition policy selects Fail, including a Pause whose configured fallback is Fail.

Order_Effect_Percent

function Order_Effect_Percent (Result : Comparison) return Long_Float

Return the estimated first-versus-second execution order effect.

Parameters
Result

Completed comparison.

Return value

Difference between order-group geometric speedups, in percent.

Outlier_Counts

type Outlier_Counts is record
   Low_Severe  : Natural := 0;
   Low_Mild    : Natural := 0;
   High_Mild   : Natural := 0;
   High_Severe : Natural := 0;
end record;

Tukey-fence classifications computed without removing any samples.

Record fields
Low_Severe

Samples below the lower outer fence.

Low_Mild

Samples between the lower outer and inner fences.

High_Mild

Samples between the upper inner and outer fences.

High_Severe

Samples above the upper outer fence.

Outliers

function Outliers (Result : Measurement) return Outlier_Counts

Return diagnostic Tukey-fence classifications without removing samples.

Parameters
Result

Completed measurement.

Return value

Diagnostic outlier classifications, with no samples removed.

P95_Nanoseconds

function P95_Nanoseconds (Result : Measurement) return Long_Float

Return the 95th percentile of per-operation batch averages. This is not an individual-operation tail-latency percentile.

Parameters
Result

Completed measurement.

Return value

Linearly interpolated 95th percentile in nanoseconds.

P99_Nanoseconds

function P99_Nanoseconds (Result : Measurement) return Long_Float

Return the 99th percentile of per-operation batch averages. This is not an individual-operation tail-latency percentile.

Parameters
Result

Completed measurement.

Return value

Linearly interpolated 99th percentile in nanoseconds.

Pause

function Pause
  (On_Pause_Timeout           : Condition_Pause_Fallback;
   Require_Nonreduced_Profile : Boolean := True;
   Require_Profile_Detection  : Boolean := False;
   Maximum_Thermal_State      : Thermal_State_Threshold := Thermal_State_Fair;
   Require_Thermal_Detection  : Boolean := False;
   Window                     : Positive_Duration := 0.050;
   Stable_Time                : Positive_Duration := 0.500;
   Poll_Interval              : Positive_Duration := 0.100;
   Maximum_Pause_Time         : Positive_Duration := 30.0;
   Rewarm_Time                : Nonnegative_Duration := 0.050) return Operating_Conditions_Policy

Construct a policy that waits for acceptable conditions and recollects the complete affected sample, pair, or round. The pause-budget expiration action is mandatory rather than silently defaulted.

Parameters
On_Pause_Timeout

Action when the total condition-wait budget expires.

Require_Nonreduced_Profile

Whether a reduced configured profile or enabled low-power mode is unacceptable.

Require_Profile_Detection

Whether missing configured-profile evidence is unacceptable.

Maximum_Thermal_State

Highest acceptable observed thermal state.

Require_Thermal_Detection

Whether absence of every supported thermal-state, throttle-counter, and degradation signal is unacceptable.

Window

Minimum target duration for each complete collection window.

Stable_Time

Required continuous acceptable interval after Pause.

Poll_Interval

Delay between condition probes while Pause waits.

Maximum_Pause_Time

Total condition-wait budget for the complete run.

Rewarm_Time

Workload rewarm duration after conditions recover.

Return value

A pausing operating-condition policy.

Percentage

subtype Percentage is Long_Float range 0.0 .. 100.0;

Share of an observed capacity, in percent.

Performance_Degradation

type Performance_Degradation is
  (Degradation_Unknown, Not_Degraded, High_Operating_Temperature, Lap_Detected, Other_Degradation);

Performance degradation reason reported by the configured-profile detector.

Enumeration literals
Degradation_Unknown

No supported detector supplied a degradation reason.

Not_Degraded

The detector reports no performance degradation.

High_Operating_Temperature

The detector reports a high operating temperature.

Lap_Detected

The detector reports that the host is operating on a lap or a similar restricted surface.

Other_Degradation

The detector reports another degradation reason.

Performance_Profile

type Performance_Profile is (Profile_Unknown, Profile_Reduced, Profile_Balanced, Profile_Performance);

Configured host performance profile. Unknown is distinct from a balanced/default profile and is never treated as evidence of a good benchmarking condition.

Enumeration literals
Profile_Unknown

No supported detector supplied a configured performance profile.

Profile_Reduced

The host selected a reduced-power profile.

Profile_Balanced

The host selected a balanced or default profile.

Profile_Performance

The host selected a performance profile.

Placement_Outcome

type Placement_Outcome is
  (Placement_Not_Requested, Placement_Strict, Placement_Advisory, Placement_Rejected);

Outcome of optional harness-applied placement.

Enumeration literals
Placement_Not_Requested

The policy was disabled.

Placement_Strict

The benchmark thread is bound to one logical CPU.

Placement_Advisory

The platform accepted only a scheduler hint, so the executing CPU is unknown and observation stays host-wide.

Placement_Rejected

The platform refused the request.

Placement_Policy

type Placement_Policy (Enabled : Boolean := False) is record
   case Enabled is
      when True =>
         CPU              : Natural := 0;
         Include_Siblings : Boolean := True;
         Require_Strict   : Boolean := False;
      when False =>
         null;
   end case;
end record;

Controls optional harness-applied placement of the benchmark thread. Placement is never neutral: it fixes frequency and thermal behavior and removes the load balancing a deployed workload would receive. It also binds only the calling thread, so a benchmark whose work runs on event loops or a native executor pool stays partly unplaced. Use it for single-threaded microbenchmarks, not for scheduler measurements.

Record fields
Enabled

Whether the harness pins its own benchmark thread.

CPU

Zero-based logical CPU, or Darwin affinity tag index.

Include_Siblings

Whether SMT siblings of the placed CPU join the watched set. A sibling saturated by another process perturbs the measurement while leaving the placed CPU's own busy share clean, so disabling this makes core-scoped observation confidently wrong.

Require_Strict

Whether an advisory-only platform is an error rather than a documented degradation.

Placement_Unavailable

Placement_Unavailable : exception;

Raised when Require_Strict placement is not available.

Positive_Duration

subtype Positive_Duration is Duration range Duration'Small .. Duration'Last;

Wall-time interval that must actually elapse. Duration'Small is one nanosecond, so this covers all of Duration above zero.

Positive_Iteration_Count

subtype Positive_Iteration_Count is Iteration_Count range 1 .. Iteration_Count'Last;

Batch size for one timed sample, which is never empty.

Practical_Threshold_Percent

function Practical_Threshold_Percent (Result : Comparison) return Long_Float

Return the configured practical-effect threshold.

Parameters
Result

Completed comparison.

Return value

Symmetric relative-time threshold in percent.

Primary_Timing_Axis

function Primary_Timing_Axis (Result : Measurement) return Custom_Metric_Count

Locate the declared primary alternate timer.

Parameters
Result

Completed measurement.

Return value

Its one-based custom axis, or zero when none was declared.

Process_Performance_Profile

type Process_Performance_Profile is
  (Process_Profile_Unknown, Process_Profile_Default, Process_Profile_Sustained);

Process performance profile exposed by newer macOS releases. Neither Default nor Sustained is intrinsically unacceptable; changing away from the profile established after warmup is the transient event.

Enumeration literals
Process_Profile_Unknown

No supported detector supplied a process performance profile.

Process_Profile_Default

The process uses the default profile.

Process_Profile_Sustained

The process uses the sustained profile.

Process_Resource_Metrics

Process_Resource_Metrics   : constant Metric_Set :=
  [Wall_Time .. Filesystem_Output_Operations => True, others => False];

Portable Darwin/Linux process, thread, memory, fault, switch, and I/O counters in addition to wall time.

Progress_Handler

type Progress_Handler is
  access procedure (Name : String; Phase : Progress_Phase; Completed : Natural; Total : Natural);

Receives coarse benchmark progress. Total is zero when a phase has no meaningful bounded work count.

Parameters
Name

Human-readable benchmark or implementation identity.

Phase

Current benchmark stage.

Completed

Completed work units in the current stage.

Total

Total work units, or zero when the phase is unbounded.

Progress_Phase

type Progress_Phase is
  (Starting,
   Waiting_For_CPU_Quiescence,
   Warming,
   Calibrating,
   Sampling,
   Analyzing,
   Finished,
   Waiting_For_Operating_Conditions);

Stage reported by an optional progress callback. Callbacks execute only outside timed regions.

Enumeration literals
Starting

The run is initializing its clock and state.

Waiting_For_CPU_Quiescence

The harness is waiting for sustained low host CPU utilization before warmup.

Warming

The operation is executing outside timed sampling.

Calibrating

The harness is selecting a batch size.

Sampling

Timed samples are being collected.

Analyzing

Statistics and confidence intervals are being computed.

Finished

The result is complete.

Waiting_For_Operating_Conditions

The harness is waiting for an accepted profile and stable thermal conditions.

Quantization_Floor_Nanoseconds

function Quantization_Floor_Nanoseconds (Result : Measurement) return Long_Float

Return the clock-quantization floor amortized over one sample batch.

Parameters
Result

Completed measurement.

Return value

Nominal resolution divided by calibrated iterations.

Reference_First_Samples

function Reference_First_Samples (Result : Comparison) return Natural

Return how many timed pairs ran the reference first.

Parameters
Result

Completed comparison.

Return value

Timed pairs that ran the reference side first.

Reference_Measurement

function Reference_Measurement (Result : Comparison) return Measurement

Return the reference side of a paired comparison.

Parameters
Result

Completed comparison.

Return value

Reference-side measurement using the shared sample schedule.

Reference_Wins

function Reference_Wins (Result : Comparison) return Natural

Return the number of sample pairs won by the reference.

Parameters
Result

Completed comparison.

Return value

Pairs in which the reference took less time.

Register_Custom_Metric

procedure Register_Custom_Metric
  (Registry       : in out Custom_Metric_Registry;
   Name           : String;
   Unit           : String;
   Scope          : Metric_Scope;
   Attribution    : Metric_Attribution;
   Direction      : Metric_Direction;
   Semantics      : Custom_Sample_Semantics := Cumulative_Delta;
   Normalization  : Custom_Normalization := Per_Operation;
   Comparison     : Custom_Comparison_Semantics := Relative_Positive;
   Primary_Timing : Boolean := False;
   Timing_Source  : String := "";
   Resolution     : Long_Float := 0.0)

Register one axis in deterministic registration order. Names are lowercase ASCII identifiers beginning with a letter and containing only letters, digits, '.', '_', or '-'. Units and timing-source names are nonempty printable ASCII without commas, quotes, backslashes, or control characters. Duplicate identities and built-in-name collisions raise Constraint_Error. Registration beyond Max_Custom_Metrics raises Capacity_Error.

Parameters
Registry

Registry to extend before collection.

Name

Stable lowercase identity.

Unit

Unit after optional iteration normalization.

Scope

Boundary covered by the value.

Attribution

Quality of the provider's attribution boundary.

Direction

Favorable comparison direction or diagnostic.

Semantics

Interpretation of begin and end snapshot fields.

Normalization

Per-batch or per-operation storage.

Comparison

Relative-positive or signed absolute comparison.

Primary_Timing

Whether this is the reported alternate timer.

Timing_Source

Stable alternate timing source identity.

Resolution

Positive resolution in Unit for a primary timer.

Relative_Time_Change_Confidence_High

function Relative_Time_Change_Confidence_High (Result : Comparison) return Long_Float

Return the upper endpoint of the contender's relative time interval.

Parameters
Result

Completed comparison.

Return value

Upper endpoint of the relative-time-change interval.

Relative_Time_Change_Confidence_Low

function Relative_Time_Change_Confidence_Low (Result : Comparison) return Long_Float

Return the lower endpoint of the contender's relative time interval.

Parameters
Result

Completed comparison.

Return value

Lower endpoint of the relative-time-change interval.

Relative_Time_Change_Percent

function Relative_Time_Change_Percent (Result : Comparison) return Long_Float

Return the contender's relative time change. A negative value means the contender took less time.

Parameters
Result

Completed comparison.

Return value

Contender time change relative to the reference, in percent.

Sample_Count

subtype Sample_Count is Positive range 10 .. 1_000;

Number of independently timed samples collected for one measurement.

Sample_Foreign_CPU_Percent

function Sample_Foreign_CPU_Percent (Result : Measurement; Index : Sample_Index) return Long_Float

Return the foreign CPU share observed over the window containing one sample. Samples collected before the first window closed, and every sample of an unwatched run, report zero.

Parameters
Result

Completed measurement.

Index

One-based index into its collected raw samples.

Return value

Foreign share of total CPU capacity, in percent.

Raised exceptions
Constraint_Error

If Index exceeds the collected sample count.

Sample_Index

subtype Sample_Index is Positive range 1 .. Sample_Count'Last;

Index into the raw samples retained by a measurement.

Sample_Lag_One_Correlation

function Sample_Lag_One_Correlation (Result : Measurement) return Long_Float

Return lag-one correlation of sequential sample means.

Parameters
Result

Completed measurement.

Return value

Lag-one sample correlation, or zero when undefined.

Sample_Nanoseconds

function Sample_Nanoseconds (Result : Measurement; Index : Sample_Index) return Long_Float

Return one retained per-operation sample.

Parameters
Result

Completed measurement.

Index

One-based index into its collected raw samples.

Return value

Per-operation duration in nanoseconds.

Raised exceptions
Constraint_Error

If Index exceeds the collected sample count.

Sample_Speedup

function Sample_Speedup (Result : Comparison; Index : Sample_Index) return Long_Float

Return the speedup ratio retained for one adjacent sample pair.

Parameters
Result

Completed comparison.

Index

One-based index into its paired raw samples.

Return value

Reference-time/contender-time ratio for the pair.

Raised exceptions
Constraint_Error

If Index exceeds the collected sample count.

Samples

function Samples (Result : Measurement) return Sample_Count

Return the number of independently timed samples.

Parameters
Result

Completed measurement.

Return value

Number of collected raw samples.

Scope

function Scope (Axis : Metric_Axis) return Metric_Scope

Return the attribution boundary of one metric.

Parameters
Axis

Selected measurement axis.

Return value

Wall, process, current-thread, native-task-tree, or Flyology runtime scope.

Set_Custom_Probe

procedure Set_Custom_Probe (Registry : in out Custom_Metric_Registry; Probe : Custom_Probe)

Install the one provider used by a registry. The provider address lives only for the synchronous call; completed results never retain it.

Parameters
Registry

Registry used by a subsequent synchronous runner call.

Probe

Begin/end snapshot callback.

Shootout_Batching

function Shootout_Batching (Result : Multi_Comparison) return Comparison_Batch_Policy

Return the batch calibration policy used by a multi-way comparison.

Parameters
Result

Completed multi-way comparison.

Return value

Equal-time or shared-iteration batch policy.

Shootout_Schedule

function Shootout_Schedule (Result : Multi_Comparison) return Shootout_Schedule_Policy

Return the schedule used to collect a multi-way comparison.

Parameters
Result

Completed multi-way comparison.

Return value

Balanced or sequential shootout schedule.

Shootout_Schedule_Policy

type Shootout_Schedule_Policy is (Balanced_Rounds, Sequential_Cases);

Controls how Compare_Many orders implementation batches. Balanced_Rounds interleaves cases and rotates their positions. Sequential_Cases completes one case's sample block before the next.

Enumeration literals
Balanced_Rounds

Interleave and position-balance implementation batches.

Sequential_Cases

Collect one implementation's block at a time.

Speedup_Confidence_High

function Speedup_Confidence_High (Result : Comparison) return Long_Float

Return the upper endpoint of the paired bootstrap speedup interval.

Parameters
Result

Completed comparison.

Return value

Upper endpoint of the paired bootstrap speedup interval.

Speedup_Confidence_Low

function Speedup_Confidence_Low (Result : Comparison) return Long_Float

Return the lower endpoint of the paired bootstrap speedup interval.

Parameters
Result

Completed comparison.

Return value

Lower endpoint of the paired bootstrap speedup interval.

Standard_Deviation_Nanoseconds

function Standard_Deviation_Nanoseconds (Result : Measurement) return Long_Float

Return the sample standard deviation of per-operation time.

Parameters
Result

Completed measurement.

Return value

Sample standard deviation in nanoseconds.

Thermal_State_Threshold

subtype Thermal_State_Threshold is
  Host_Thermal_State range Thermal_State_Nominal .. Thermal_State_Critical;

A policy threshold must name an observed thermal state. Unknown is an observation result, not an ordering threshold.

Threshold_Percentage

subtype Threshold_Percentage is Percentage range 0.0 .. Long_Float'Pred (100.0);

Percentage excluding the whole. 'Pred is a static attribute, so this stays an ordinary range constraint rather than a predicate.

Ties

function Ties (Result : Comparison) return Natural

Return the number of equal-time sample pairs.

Parameters
Result

Completed comparison.

Return value

Pairs with equal reported per-operation time.

Time_Metrics

Time_Metrics               : constant Metric_Set := [Wall_Time => True, others => False];

Wall-time results only, without additional native probes.

Timer_Cost_Nanoseconds

function Timer_Cost_Nanoseconds (Result : Measurement) return Long_Float

Return the measured timestamp cost used for optional subtraction.

Parameters
Result

Completed measurement.

Return value

Minimum observed adjacent-clock cost in nanoseconds.

Verdict

function Verdict (Result : Comparison) return Comparison_Verdict

Return the practical/statistical verdict for the comparison.

Parameters
Result

Completed comparison.

Return value

Verdict derived from the interval and configured threshold.

Versus_Reference

function Versus_Reference (Result : Multi_Comparison; Index : Comparison_Case_Index) return Comparison

Return one case's paired comparison against case one.

Parameters
Result

Completed multi-way comparison.

Index

Contender index in enumeration order.

Return value

Selected paired comparison against the reference.

Raised exceptions
Constraint_Error

If Index is one or exceeds the case count.