Skip to content

Commit

Permalink
use min by default; allow median
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Apr 4, 2024
1 parent a752b1a commit a781a86
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/perf-test-results/compare-multiple.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ const { loadResultFile, printComparisonReport, SUITE_FOR } = require('./lib');

const [ , , ...files ] = process.argv;

let useStat = 'min';
if (files[0] === '--min' || files[0] === '--median') {
if (files[0] === '--median') {
useStat = 'median';
}
files.shift();
}

const rawResults = files.map(loadResultFile);

const adapters = [];
Expand Down Expand Up @@ -99,4 +107,4 @@ Object.entries(clients).forEach(([ adapter, clients ]) => {
if(allClients.length > 1) throw new Error(`More than one client used for adapter: ${adapter}. Client-based differentiation is not currently supported, and will give confusing results.`);
const client = [...allClients][0];

printComparisonReport({ client, useStat:'median' }, ...sortedResults);
printComparisonReport({ client, useStat }, ...sortedResults);

0 comments on commit a781a86

Please sign in to comment.