testing/cross_backend/bench/bench_report.ts

Reporting adapters over a CrossImplBenchResult — all built on fuz_util's formatters + Welch comparison. Markdown for human eyeballs, a per-scenario TS-vs-reference significance verdict, and a self-describing JSON artifact.

view source

Declarations
#

6 declarations

compare_cross_impl
#

testing/cross_backend/bench/bench_report.ts view source

(result: CrossImplBenchResult, options?: CompareCrossImplOptions | undefined): CrossImplComparisonEntry[] import {compare_cross_impl} from '@fuzdev/fuz_app/testing/cross_backend/bench/bench_report.js';

Welch-test verdict for every non-reference backend vs the reference, per scenario. With deno + node + rust and reference: 'deno' you get node vs deno and rust vs deno for each scenario.

result

options?

type CompareCrossImplOptions | undefined
optional

returns

CrossImplComparisonEntry[]

CompareCrossImplOptions
#

testing/cross_backend/bench/bench_report.ts view source

CompareCrossImplOptions import type {CompareCrossImplOptions} from '@fuzdev/fuz_app/testing/cross_backend/bench/bench_report.js';

reference?

Backend to compare every other backend against. Defaults to result.backends[0].

type string

readonly

CrossImplComparisonEntry
#

testing/cross_backend/bench/bench_report.ts view source

CrossImplComparisonEntry import type {CrossImplComparisonEntry} from '@fuzdev/fuz_app/testing/cross_backend/bench/bench_report.js';

One backend's result compared against the reference backend, per scenario.

scenario

type string

readonly

reference

The reference backend (a side of the comparison).

type string

readonly

backend

The compared backend (b side).

type string

readonly

comparison

type BenchmarkComparison

readonly

format_cross_impl_comparison
#

testing/cross_backend/bench/bench_report.ts view source

(entries: readonly CrossImplComparisonEntry[]): string import {format_cross_impl_comparison} from '@fuzdev/fuz_app/testing/cross_backend/bench/bench_report.js';

Render the comparison entries as one line each. The prefix lists the reference first to match benchmark_stats_compare's "First" (= the a arg = reference) / "Second" (= the b arg = backend) in the recommendation text — compare_cross_impl passes (reference, backend).

entries

type readonly CrossImplComparisonEntry[]

returns

string

format_cross_impl_json
#

testing/cross_backend/bench/bench_report.ts view source

(result: CrossImplBenchResult): string import {format_cross_impl_json} from '@fuzdev/fuz_app/testing/cross_backend/bench/bench_report.js';

Self-describing JSON artifact: one entry per backend × scenario with the percentiles (raw-sample tail), the resolved budget, and iteration count. Diffable and reviewable without a TS runtime; the seed for the deferred static-docs comparison surface.

result

returns

string

format_cross_impl_markdown
#

Depends on
#