Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/merlin/deps.ts>pretty_benching.prettyBenchmarkHistoryOptions

Testing and Benchmarking framework for deno 🧙‍♂️
Latest
interface pretty_benching.prettyBenchmarkHistoryOptions
import { type pretty_benching } from "https://deno.land/x/merlin@v1.0.7/deps.ts";
const { prettyBenchmarkHistoryOptions } = pretty_benching;

Defines the rules on what and how the history should contain.

Type Parameters

optional
T = unknown

The type that is calculated with benchExtras function and stored in each benchmarks' extras.

optional
K = unknown

The type that is calculated with runExtras function and stored in each runs' runExtras.

Properties

optional
easeOnlyHrTime: boolean

Allow storing low precision measurements

optional
strict: boolean | strictHistoryRules

Turns on strict mode. Setting it to boolean true gives the same result as setting each rule to true in the rules object.

optional
minRequiredRuns: number

Throw an error, when any benchmark has lower runsCount than the set value.

optional
saveIndividualRuns: boolean

Saves the measuredRunsMs array for each benchmark.

WARNING this could result in a very big history file overtime.

Consider calculating necessary values before save instead with benchExtras or runExtras.

optional
benchExtras: (result: BenchmarkResult) => T

Saves the returned object for each benchmark into it's extras property.

optional
runExtras: (runResult: BenchmarkRunResult) => K

Saves the returned object for each run into it's runExtras property.