output_matrix.ts

The token-count and output-size tables: the deterministic numbers each cell of a results file states, as rows. A token count is on an input's tokenize cell and its HTML's size on the html cell, so one input yields a row for each selected measure. The HTML's size is shown raw or compressed, as the bundle sizes are.

view source

Declarations
#

4 declarations

OUTPUT_MEASURES
#

output_matrix.ts view source

readonly { id: OutputMeasure; label: string; mode: "tokenize" | "html"; unit: MatrixUnit; }[] import {OUTPUT_MEASURES} from '@ryanatkn/syntax-highlighter-bench/output_matrix.js';

Every output measure, with its label, the mode whose cell states it, and its unit.

OutputMeasure
#

output_matrix.ts view source

OutputMeasure

type "tokens" | "html_bytes" | "spans"

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

A deterministic number of a cell: its token count, or a size of its HTML.

OutputSelection
#

output_matrix.ts view source

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

Which inputs and which of their numbers the output tables show.

inheritance

extends: Omit<CellSelection, 'modes'>

measures

type readonly string[]

compression

How the HTML's size is shown: raw, or compressed at the bundle sizes' levels.

type BundleCompression

to_output_groups
#

output_matrix.ts view source

(results: MatrixResults, selection: OutputSelection): MatrixGroup[] import {to_output_groups} from '@ryanatkn/syntax-highlighter-bench/output_matrix.js';

The selected inputs as groups of one language and one source, with a row for each selected measure of each input. There is no summary row: libraries split the same source differently and wrap their HTML differently, so a smaller count is not a better one.

results

selection

returns

MatrixGroup[]

Depends on
#

Imported by
#