← All compilation units

Flyology_Bench.Reporters

Description

Renders benchmark measurements and comparisons for people and tools.

Console_Style

type Console_Style is (Auto, Plain, ANSI);

Selects whether human-readable console output uses ANSI styling.

Enumeration literals
Auto

Enable ANSI only when the destination is an interactive terminal and styling has not been disabled by the environment.

Plain

Never emit ANSI control sequences.

ANSI

Emit ANSI color and terminal control sequences.

Machine_Context

type Machine_Context is private;

Optional suite-owned identity and outcome attached to machine rows. The default value preserves every legacy reporter schema exactly. @field Suite_Name Stable suite identity. @field Benchmark_Name Stable full registered identity. @field Result_Kind Suite result discriminator. @field Outcome Suite execution outcome. @field Dry_Run Whether the row is validation-only. @field Present Whether contextual columns and fields are emitted.

Make_Machine_Context

function Make_Machine_Context
  (Suite_Name     : String;
   Benchmark_Name : String;
   Result_Kind    : String;
   Outcome        : String;
   Dry_Run        : Boolean := False) return Machine_Context

Construct context for a result streamed by a suite runner.

Parameters
Suite_Name

Stable suite identity.

Benchmark_Name

Stable full registered identity.

Result_Kind

Suite result discriminator.

Outcome

Suite execution outcome.

Dry_Run

Whether the result is validation-only.

Return value

Context that prefixes CSV rows and extends JSON objects.

No_Machine_Context

No_Machine_Context : constant Machine_Context;

Context value that leaves legacy machine schemas unchanged.

Put_Comparison_Console

procedure Put_Comparison_Console
  (Reference_Name : String;
   Contender_Name : String;
   Result         : Comparison;
   File           : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output;
   Style          : Console_Style := Auto)

Print one compact paired-comparison summary. Speedup greater than one and negative time change both mean the contender was faster. When an alternate timer is primary, its comparison is identified in the axes table and the top-level wall comparison is labeled as harness wall.

Parameters
Reference_Name

Name of the existing or baseline operation.

Contender_Name

Name of the operation compared with it.

Result

Completed paired comparison.

File

Destination text file.

Style

ANSI styling policy.

Put_Comparison_CSV

procedure Put_Comparison_CSV
  (Reference_Name : String;
   Contender_Name : String;
   Result         : Comparison;
   File           : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one paired comparison as a CSV row.

Parameters
Reference_Name

Name of the existing or baseline operation.

Contender_Name

Name of the operation compared with it.

Result

Completed paired comparison.

File

Destination text file. @param Context Optional suite context.

Put_Comparison_CSV

procedure Put_Comparison_CSV
  (Reference_Name : String;
   Contender_Name : String;
   Result         : Comparison;
   File           : Ada.Text_IO.File_Type;
   Context        : Machine_Context)

Print one paired comparison as a suite-context CSV row.

Parameters
Reference_Name

Reference benchmark name.

Contender_Name

Contender benchmark name.

Result

Completed paired comparison.

File

Destination text file.

Context

Suite context to prefix to the row.

Put_Comparison_CSV_Header

procedure Put_Comparison_CSV_Header (File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print the schema header expected by Put_Comparison_CSV rows.

Parameters
File

Destination text file. @param Context Optional suite context.

Put_Comparison_CSV_Header

procedure Put_Comparison_CSV_Header (File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print the suite-context paired-comparison CSV header.

Parameters
File

Destination text file.

Context

Suite context to prefix to the schema.

Put_Comparison_JSON

procedure Put_Comparison_JSON
  (Reference_Name : String;
   Contender_Name : String;
   Result         : Comparison;
   File           : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one paired comparison as a newline-delimited JSON object.

Parameters
Reference_Name

Name of the existing or baseline operation.

Contender_Name

Name of the operation compared with it.

Result

Completed paired comparison.

File

Destination text file. @param Context Optional suite context.

Put_Comparison_JSON

procedure Put_Comparison_JSON
  (Reference_Name : String;
   Contender_Name : String;
   Result         : Comparison;
   File           : Ada.Text_IO.File_Type;
   Context        : Machine_Context)

Print one paired comparison as a suite-context JSON object.

Parameters
Reference_Name

Reference benchmark name.

Contender_Name

Contender benchmark name.

Result

Completed paired comparison.

File

Destination text file.

Context

Suite context to add to the object.

Put_Comparison_Metrics_CSV

procedure Put_Comparison_Metrics_CSV
  (Reference_Name : String;
   Contender_Name : String;
   Result         : Comparison;
   File           : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one row per requested paired metric comparison.

Parameters
Reference_Name

Reference implementation name.

Contender_Name

Contender implementation name.

Result

Completed paired comparison.

File

Destination text file. @param Context Optional suite context.

Put_Comparison_Metrics_CSV

procedure Put_Comparison_Metrics_CSV
  (Reference_Name : String;
   Contender_Name : String;
   Result         : Comparison;
   File           : Ada.Text_IO.File_Type;
   Context        : Machine_Context)

Print paired metric results as suite-context CSV rows.

Parameters
Reference_Name

Reference benchmark name.

Contender_Name

Contender benchmark name.

Result

Completed paired comparison.

File

Destination text file.

Context

Suite context to prefix to every row.

Put_Comparison_Metrics_CSV_Header

procedure Put_Comparison_Metrics_CSV_Header (File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print the long-form schema header used by comparison metric rows.

Parameters
File

Destination text file. @param Context Optional suite context.

Put_Comparison_Metrics_CSV_Header

procedure Put_Comparison_Metrics_CSV_Header (File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print the suite-context paired metric CSV header.

Parameters
File

Destination text file.

Context

Suite context to prefix to the schema.

Put_Comparison_Metrics_NDJSON

procedure Put_Comparison_Metrics_NDJSON
  (Reference_Name : String;
   Contender_Name : String;
   Result         : Comparison;
   File           : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Emit one JSON object per built-in or custom paired axis, including distinct reference and contender resolutions.

Parameters
Reference_Name

Reference benchmark identity.

Contender_Name

Contender benchmark identity.

Result

Completed paired comparison.

File

Destination text file.

Put_Console

procedure Put_Console
  (Name              : String;
   Result            : Measurement;
   File              : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output;
   Style             : Console_Style := Auto;
   Include_Telemetry : Boolean := True)

Print one compact, human-readable benchmark summary. A declared primary alternate timer is shown first with its source and resolution; harness wall time remains explicitly labeled as the calibration clock.

Parameters
Name

Benchmark name.

Result

Completed measurement.

File

Destination text file.

Style

ANSI styling policy.

Include_Telemetry

Whether to append host context to the card: the interference, placement, and claim observations retained with the measurement, plus process-wide telemetry from the most recent terminal-mode run.

Put_CSV

procedure Put_CSV
  (Name : String; Result : Measurement; File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one benchmark as a CSV row with nanosecond-valued statistics.

Parameters
Name

Benchmark name.

Result

Completed measurement.

File

Destination text file. @param Context Optional suite context.

Put_CSV

procedure Put_CSV
  (Name : String; Result : Measurement; File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print one benchmark as a suite-context CSV row.

Parameters
Name

Benchmark name.

Result

Completed measurement.

File

Destination text file.

Context

Suite context to prefix to the row.

Put_CSV_Header

procedure Put_CSV_Header (File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print the schema header expected by Put_CSV rows.

Parameters
File

Destination text file. @param Context Optional suite context.

Put_CSV_Header

procedure Put_CSV_Header (File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print the suite-context schema header expected by contextual CSV rows.

Parameters
File

Destination text file.

Context

Suite context to prefix to the schema.

Put_Extended_Comparison_Metrics_CSV

procedure Put_Extended_Comparison_Metrics_CSV
  (Reference_Name : String;
   Contender_Name : String;
   Result         : Comparison;
   File           : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print versioned built-in and custom paired metric rows.

Parameters
Reference_Name

Reference benchmark identity.

Contender_Name

Contender benchmark identity.

Result

Completed paired comparison.

File

Destination text file.

Put_Extended_Comparison_Metrics_CSV_Header

procedure Put_Extended_Comparison_Metrics_CSV_Header
  (File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print the versioned built-in/custom comparison schema, including distinct reference and contender resolutions.

Parameters
File

Destination text file.

Put_Extended_Metrics_CSV

procedure Put_Extended_Metrics_CSV
  (Name : String; Result : Measurement; File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print versioned built-in and custom metric rows.

Parameters
Name

Benchmark identity.

Result

Completed measurement.

File

Destination text file.

Put_Extended_Metrics_CSV_Header

procedure Put_Extended_Metrics_CSV_Header (File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Versioned long-form schema for built-in and custom axes. The original Put_Metrics_CSV schema remains unchanged.

Parameters
File

Destination text file.

Put_Gate_Console

procedure Put_Gate_Console
  (Result : Flyology_Bench.Baselines.Gate_Result;
   File   : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output;
   Style  : Console_Style := Auto)

Print one human-readable saved-baseline gate decision.

Parameters
Result

Completed gate evaluation.

File

Destination text file.

Style

ANSI styling policy.

Put_Gate_CSV

procedure Put_Gate_CSV
  (Result : Flyology_Bench.Baselines.Gate_Result;
   File   : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one saved-baseline gate decision as a CSV row. The bootstrap method, confidence level, resample count, and seed are always present; interval fields are empty when no compatible comparison ran.

Parameters
Result

Completed gate evaluation.

File

Destination text file.

Put_Gate_CSV_Header

procedure Put_Gate_CSV_Header (File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print the schema header expected by Put_Gate_CSV rows.

Parameters
File

Destination text file.

Put_Gate_JSON

procedure Put_Gate_JSON
  (Result : Flyology_Bench.Baselines.Gate_Result;
   File   : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one saved-baseline gate decision as a newline-delimited JSON object. The statistical contract is always present; interval fields are null when no compatible comparison ran.

Parameters
Result

Completed gate evaluation.

File

Destination text file.

Put_JSON

procedure Put_JSON
  (Name : String; Result : Measurement; File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one benchmark as a newline-delimited JSON object.

Parameters
Name

Benchmark name.

Result

Completed measurement.

File

Destination text file. @param Context Optional suite context.

Put_JSON

procedure Put_JSON
  (Name : String; Result : Measurement; File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print one benchmark as a suite-context JSON object.

Parameters
Name

Benchmark name.

Result

Completed measurement.

File

Destination text file.

Context

Suite context to add to the object.

Put_Metrics_CSV

procedure Put_Metrics_CSV
  (Name : String; Result : Measurement; File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one row per requested metric axis. Unavailable axes retain their identity, scope, unit, and specific status with an available=false marker.

Parameters
Name

Benchmark name.

Result

Completed measurement.

File

Destination text file. @param Context Optional suite context.

Put_Metrics_CSV

procedure Put_Metrics_CSV
  (Name : String; Result : Measurement; File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print requested metrics as suite-context CSV rows.

Parameters
Name

Benchmark name.

Result

Completed measurement.

File

Destination text file.

Context

Suite context to prefix to every row.

Put_Metrics_CSV_Header

procedure Put_Metrics_CSV_Header (File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print the long-form schema header used by Put_Metrics_CSV rows.

Parameters
File

Destination text file. @param Context Optional suite context.

Put_Metrics_CSV_Header

procedure Put_Metrics_CSV_Header (File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print the suite-context long-form metric schema header.

Parameters
File

Destination text file.

Context

Suite context to prefix to the schema.

Put_Metrics_NDJSON

procedure Put_Metrics_NDJSON
  (Name : String; Result : Measurement; File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Emit one self-contained JSON object per built-in or custom axis.

Parameters
Name

Benchmark identity.

Result

Completed measurement.

File

Destination text file.

Put_Multi_Comparison_Console

generic
   type Case_Id is (<>);
procedure Put_Multi_Comparison_Console
  (Result                  : Multi_Comparison;
   File                    : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output;
   Style                   : Console_Style := Auto;
   Show_Individual_Details : Boolean := False)

Print a colored table of every implementation versus case one.

Generic formal parameters
Case_Id
Parameters
Result

Completed multi-way comparison.

File

Destination text file.

Style

ANSI styling policy.

Show_Individual_Details

Print a full measurement card for every implementation after the comparison table. Process telemetry remains attached once to the overall shootout.

Put_Multi_Comparison_CSV

generic
   type Case_Id is (<>);
procedure Put_Multi_Comparison_CSV
  (Result : Multi_Comparison; File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one CSV row per contender versus case one.

Generic formal parameters
Case_Id
Parameters
Result

Completed multi-way comparison.

File

Destination text file. @param Context Optional suite context.

Put_Multi_Comparison_CSV_Header

procedure Put_Multi_Comparison_CSV_Header (File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print the schema header used by multi-way CSV rows.

Parameters
File

Destination text file. @param Context Optional suite context.

Put_Multi_Comparison_CSV_Header

procedure Put_Multi_Comparison_CSV_Header (File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print the suite-context multi-way CSV header.

Parameters
File

Destination text file.

Context

Suite context to prefix to the schema.

Put_Multi_Comparison_CSV_With_Context

generic
   type Case_Id is (<>);
procedure Put_Multi_Comparison_CSV_With_Context
  (Result : Multi_Comparison; File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print suite-context multi-way CSV rows.

Generic formal parameters
Case_Id
Parameters
Result

Completed multi-way comparison.

File

Destination text file.

Context

Suite context to prefix to every row.

Put_Multi_Comparison_JSON

generic
   type Case_Id is (<>);
procedure Put_Multi_Comparison_JSON
  (Result : Multi_Comparison; File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one JSON object containing the reference and all contender rows.

Generic formal parameters
Case_Id
Parameters
Result

Completed multi-way comparison.

File

Destination text file. @param Context Optional suite context.

Put_Multi_Comparison_JSON_With_Context

generic
   type Case_Id is (<>);
procedure Put_Multi_Comparison_JSON_With_Context
  (Result : Multi_Comparison; File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print one suite-context multi-way JSON object.

Generic formal parameters
Case_Id
Parameters
Result

Completed multi-way comparison.

File

Destination text file.

Context

Suite context to add to the object.

Put_Multi_Comparison_Metrics_CSV

generic
   type Case_Id is (<>);
procedure Put_Multi_Comparison_Metrics_CSV
  (Result : Multi_Comparison; File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output)

Print one long-form comparison metric row per contender and axis. Use Put_Comparison_Metrics_CSV_Header for the schema header.

Generic formal parameters
Case_Id
Parameters
Result

Completed multi-way comparison.

File

Destination text file. @param Context Optional suite context.

Put_Multi_Comparison_Metrics_CSV_With_Context

generic
   type Case_Id is (<>);
procedure Put_Multi_Comparison_Metrics_CSV_With_Context
  (Result : Multi_Comparison; File : Ada.Text_IO.File_Type; Context : Machine_Context)

Print suite-context multi-way metric CSV rows.

Generic formal parameters
Case_Id
Parameters
Result

Completed multi-way comparison.

File

Destination text file.

Context

Suite context to prefix to every row.

Terminal_Mode

function Terminal_Mode
  (Base : Configuration := Default_Configuration; Name : String := "benchmark") return Configuration

Return a configuration that renders terminal progress for the run.

Parameters
Base

Measurement policy to preserve apart from its callback.

Name

Human-readable benchmark identity shown during progress.

Return value

Base with Terminal_Progress installed.

Terminal_Progress

procedure Terminal_Progress (Name : String; Phase : Progress_Phase; Completed : Natural; Total : Natural)

Render an in-place terminal progress display. Pass this procedure's access value as Configuration.Progress. Non-terminal output receives one plain line per phase instead of cursor control sequences. Multi-way sampling identifies the implementation in a fixed-width field.

Parameters
Name

Human-readable benchmark identity.

Phase

Current benchmark stage.

Completed

Completed units in the current stage.

Total

Total units in the current stage, or zero when unbounded.