← 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.

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.

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.

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.

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.

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.

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.

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.

Parameters
Name

Benchmark name.

Result

Completed measurement.

File

Destination text file.

Style

ANSI styling policy.

Include_Telemetry

Whether to append 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.

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.

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.

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.

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.

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.

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.

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.

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.

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.