import { calculateThresholds } from "https://deno.land/x/pretty_benching@v0.3.3/mod.ts";
Calculates Thresholds
from the historic data for each benchmark.
EXPERIMENTAL The default way of calculating may change, if you relay on thresholds provide your calculation so it wont change unexpectedly
The default way the thresholds are calculated:
- only calculate threshold for benchmark, which has at least
5
previous runs green
is the (minimum of the measuredmeasuredRunsAvgMs
) *1.1
yellow
is the (maximum of the measuredmeasuredRunsAvgMs
) *1.2
This can be overridden with the options.
Parameters
history: prettyBenchmarkHistory<T, K>
optional
options: { minProceedingRuns?: number; calculate?: (runs: BenchmarkHistoryItem<T, K>[]) => Threshold; }