throughput_matrix.ts

The throughput tables: the timed cells of a results file as rows, in groups of one language and source, each mode's cells led by their geometric mean.

view source

Declarations
#

8 declarations

results_have_throughput
#

throughput_matrix.ts view source

(results: Pick<MatrixResults, "cells">): boolean import {results_have_throughput} from '@ryanatkn/syntax-highlighter-bench/throughput_matrix.js';

Whether a results file holds any timed cell value.

results

type Pick<MatrixResults, "cells">

returns

boolean

THROUGHPUT_UNITS
#

throughput_matrix.ts view source

readonly { id: ThroughputUnit; label: string; }[] import {THROUGHPUT_UNITS} from '@ryanatkn/syntax-highlighter-bench/throughput_matrix.js';

Every throughput unit, with its label, in display order.

ThroughputSelection
#

ThroughputUnit
#

throughput_matrix.ts view source

ThroughputUnit

type "ns_per_op" | "ops_per_sec" | "mb_per_sec"

import type {ThroughputUnit} from '@ryanatkn/syntax-highlighter-bench/throughput_matrix.js';

The number a throughput cell is shown as. mb_per_sec is the one to compare across inputs of different sizes.

to_throughput_badges
#

throughput_matrix.ts view source

(value: { ns_per_op: number; ops_per_sec: number; mb_per_sec: number; p10_ns: number; p90_ns: number; spread: number; pass_medians_ns: number[]; iterations: number; rss_peak_bytes: number; attempts: number; }): MatrixBadge[] import {to_throughput_badges} from '@ryanatkn/syntax-highlighter-bench/throughput_matrix.js';

The marks on a value whose rounds disagreed or that was measured again.

value

returns

MatrixBadge[]

to_throughput_details
#

throughput_matrix.ts view source

(value: { ns_per_op: number; ops_per_sec: number; mb_per_sec: number; p10_ns: number; p90_ns: number; spread: number; pass_medians_ns: number[]; iterations: number; rss_peak_bytes: number; attempts: number; }): string[] import {to_throughput_details} from '@ryanatkn/syntax-highlighter-bench/throughput_matrix.js';

Everything a cell value records, as lines for the detail view.

value

returns

string[]

to_throughput_groups
#

throughput_matrix.ts view source

(results: MatrixResults, selection: ThroughputSelection, libraries: readonly string[]): MatrixGroup[] import {to_throughput_groups} from '@ryanatkn/syntax-highlighter-bench/throughput_matrix.js';

The selected cells as groups of one language and one source. Within a group each selected mode's cells follow a geometric mean over them, so the means read as the group's summary and the cells as what they summarize.

results

selection

libraries

the selected library ids, which decide which cells are complete and so enter a mean

type readonly string[]

returns

MatrixGroup[]

to_throughput_summary
#

throughput_matrix.ts view source

(results: MatrixResults, selection: ThroughputSelection, libraries: readonly string[]): MatrixGroup import {to_throughput_summary} from '@ryanatkn/syntax-highlighter-bench/throughput_matrix.js';

The geometric means across every selected language: one row for each source and mode. Sources are never pooled, so a mean over home inputs always names the library whose samples they are.

results

selection

libraries

type readonly string[]

returns

MatrixGroup

Depends on
#

Imported by
#