Skip to main content

compareResults

@webda/bench


Function: compareResults()

compareResults(baseline, current, threshold?): Comparison[]

Defined in: packages/bench/src/reporters/compare.ts:45

Compare two runs

A scenario regresses when its throughput is divided by more than the threshold or its p99 latency multiplied by more than the threshold. Unstable results and scenarios missing on one side are ignored.

Parameters​

baseline​

BenchResult[]

results of the reference run

current​

BenchResult[]

results of the run to check

threshold?​

number = 1.5

tolerated factor, e.g. 1.5 for 50%

Returns​

Comparison[]

the comparisons, sorted by key