testing/cross_backend/bench/run_cross_impl_bench.ts

Drive identical wire scenarios across several spawned backends and time each round trip, so a TS impl and a Rust impl can be compared apples-to-apples (both cross-process over real HTTP). The reusable cross-impl measurement primitive.

fuz_util's benchmark library is the engine — Benchmark runs each scenario as a task and BenchmarkResult.stats carries the percentiles; this module is the thin scenario→task→tagged-result adapter. Reporting (markdown, TS-vs-Rust verdict, JSON artifact) lives in testing/cross_backend/bench/bench_report.ts.

view source

Declarations
#

4 declarations

CrossImplBenchEntry
#

testing/cross_backend/bench/run_cross_impl_bench.ts view source

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

One backend × one scenario, with its timing result.

backend

type string

readonly

scenario

type string

readonly

result

type BenchmarkResult

readonly

CrossImplBenchResult
#

testing/cross_backend/bench/run_cross_impl_bench.ts view source

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

Full sweep across the supplied backends and scenarios.

backends

Backend names, in the order they were run.

type ReadonlyArray<string>

readonly

scenarios

Scenario names that ran on at least one backend.

type ReadonlyArray<string>

readonly

entries

type ReadonlyArray<CrossImplBenchEntry>

readonly

run_cross_impl_bench
#

RunCrossImplBenchOptions
#

testing/cross_backend/bench/run_cross_impl_bench.ts view source

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

handles

Already-bootstrapped backends to benchmark. Each one's keeper_transport is the pre-authed transport scenarios fire against — bootstrap once, then hammer; no per-iteration reset.

type ReadonlyArray<BootstrappedBackendHandle>

readonly

scenarios

type ReadonlyArray<BenchScenario>

readonly

config?

Overrides merged over the network-tuned defaults below.

type Partial<BenchmarkConfig>

readonly

Depends on
#

Imported by
#