import { type pretty_benching } from "https://deno.land/x/merlin@v1.0.7/deps.ts";
const { ColumnDefinition } = pretty_benching;
Defines one column of the markdown table.
Properties
Defines which property of the BenchmarkResult
should be displayed, if no formatter
is defined.
Note: custom propertyKey
-s can be used, but values has to be manually mapped onto each BenchmarkResult
.
Defines how the column should be aligned. Defaults to center
Calls number.toFixed(x)
with this value, when defined and the cell value is a number
.
Also used on formatter
output values.
optional
formatter: (result: BenchmarkResult, columnDef: ColumnDefinition) => stringAllows to calculate custom cell values based on the BenchmarkResult
, and its own ColumnDefinition
.
The value will be -
for falsy values, and *
when no propertyKey
and formatter
was provided
Its favoured above propertyKey
, when both is defined.