Skip to content

Commit 363ebf9

Browse files
jasnelladuh95
andcommitted
Update benchmark/compare.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 6552ca2 commit 363ebf9

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎benchmark/compare.js‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const cli = new CLI(`usage: ./node compare.js [options] [--] <category> ...
3030
complete (Welch's t-test, effect size) instead
3131
of printing csv output to stdout
3232
--csv filename write csv output to filename (can be combined
33-
with --analyze). Use `-` to write to stdout.
33+
with --analyze). Use - to write to stdout.
3434
--scale 1000 rate-to-integer multiplier for histogram
3535
precision when using --analyze (default: 1000)
3636
--max-regression N exit with code 1 if any statistically
@@ -285,7 +285,7 @@ function printAnalysis(results, scale, maxRegression) {
285285
for (const row of rows) {
286286
const imp = `${row.improvement >= 0 ? '+' : ''}${row.improvement.toFixed(2)} %`;
287287
writeSync(process.stdout.fd,
288-
`${pad(row.name, maxNameLen)} ${pad(row.stars, 10)}` +
288+
`${pad(row.name, maxNameLen)} ${pad(row.stars, 10)}` +
289289
` ${rpad(imp, 11)}` +
290290
` ±${row.ci95.toFixed(2)}%` +
291291
` ±${row.ci99.toFixed(2)}%` +
@@ -297,7 +297,7 @@ function printAnalysis(results, scale, maxRegression) {
297297
if (skipped > 0) {
298298
writeSync(process.stdout.fd, '\n');
299299
writeSync(process.stdout.fd,
300-
`Note: ${skipped} configuration${skipped === 1 ? ' was' : 's were'}` +
300+
`Note: ${skipped} configuration${skipped === 1 ? ' was' : 's were'}` +
301301
` skipped because Welch's t-test requires at least 2 samples per` +
302302
` binary. Use --runs 2 or higher.\n`,
303303
);
@@ -308,12 +308,12 @@ function printAnalysis(results, scale, maxRegression) {
308308

309309
writeSync(process.stdout.fd, '\n');
310310
writeSync(process.stdout.fd,
311-
`Rates were scaled by ${scale}x into HdrHistogram (3 significant figures).\n` +
311+
`Rates were scaled by ${scale}x into HdrHistogram (3 significant figures).\n` +
312312
`Use --scale to adjust precision if needed.\n\n`,
313313
);
314314
const anyFamilyWise = rows.filter((r) => r.pAdjusted < 0.05).length;
315315
writeSync(process.stdout.fd,
316-
`Be aware that when doing many comparisons the risk of a false-positive\n` +
316+
`Be aware that when doing many comparisons the risk of a false-positive\n` +
317317
`result increases. In this case, there are ${rows.length} comparisons, ` +
318318
`you can thus\nexpect the following amount of false-positive results:\n` +
319319
` ${(rows.length * 0.05).toFixed(2)} false positives, when considering ` +
@@ -333,7 +333,7 @@ function printAnalysis(results, scale, maxRegression) {
333333
if (underpowered > 0) {
334334
writeSync(process.stdout.fd, '\n');
335335
writeSync(process.stdout.fd,
336-
`Note: ${underpowered} of ${rows.length} comparison` +
336+
`Note: ${underpowered} of ${rows.length} comparison` +
337337
`${rows.length === 1 ? '' : 's'} could not resolve an effect as ` +
338338
`small as ${maxRegression}%, and are marked (inconclusive). They are ` +
339339
`not\nevidence of no regression -- the samples are too noisy to tell. ` +
@@ -360,14 +360,14 @@ function printAnalysis(results, scale, maxRegression) {
360360
if (failures.length > 0) {
361361
writeSync(process.stdout.fd, '\n');
362362
writeSync(process.stdout.fd,
363-
`FAIL: ${failures.length} benchmark${failures.length === 1 ? '' : 's'}` +
363+
`FAIL: ${failures.length} benchmark${failures.length === 1 ? '' : 's'}` +
364364
` regressed by more than ${maxRegression}%` +
365365
` (interval excludes the threshold,\n` +
366366
`family-wise corrected across ${rows.length} comparisons):\n`,
367367
);
368368
for (const f of failures) {
369369
writeSync(process.stdout.fd,
370-
` ${f.name} ${f.improvement.toFixed(2)}% ` +
370+
` ${f.name} ${f.improvement.toFixed(2)}% ` +
371371
`(95% CI up to ${(f.improvement + f.ci95).toFixed(2)}%, ` +
372372
`adjusted p=${f.pAdjusted.toExponential(2)})\n`,
373373
);

0 commit comments

Comments
 (0)