Skip to main content
Module

x/pretty_benching/pretty_benchmark_history.ts>prettyBenchmarkHistoryOptions

:sauropod: A small lib to make your Deno benchmarking progress and results look pretty
Latest
interface prettyBenchmarkHistoryOptions
import { type prettyBenchmarkHistoryOptions } from "https://deno.land/x/pretty_benching@v0.3.3/pretty_benchmark_history.ts";

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.