James M Snell
bf67fdc6d7
benchmark: add --analyze mode to compare.js
...
Add an --analyze flag that performs statistical analysis directly
after benchmarks complete, eliminating the need for R and compare.R.
When --analyze is specified, compare.js collects the rate data during
the run and prints a statistical summary table instead of CSV output.
The table matches the format of compare.R: improvement percentage,
significance stars (* p<0.05, ** p<0.01, *** p<0.001), and confidence
intervals at three risk levels.
Also adds a --max-regression N option that causes the compare.js to
exit with 1 (error) when the `--new` is N% slower. Useful for CI
use to detect regressions.
Uses the histogram API's welchTest() and cohensD() methods introduced
in the previous commit. Benchmark rates are scaled to integers for
HdrHistogram recording; the --scale option (default 1000) controls
the multiplier for precision.
Usage:
node benchmark/compare.js --old ./node-old --new ./node-new \
--analyze url
Signed-off-by: James M Snell <jasnell@gmail.com >
Assisted-by: Opencode/Opus
PR-URL: https://github.com/nodejs/node/pull/65416
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2026-08-23 20:29:20 +00:00
Michaël Zasso
bf31d3c3b1
tools: enable no-unused-expressions lint rule
...
Fixes: https://github.com/nodejs/node/issues/36246
PR-URL: https://github.com/nodejs/node/pull/36248
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-12-07 20:33:45 +01:00
gengjiawen
8d99ba6754
benchmark: remove unused field in class BenchmarkProgress
...
PR-URL: https://github.com/nodejs/node/pull/26925
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-03-29 06:26:11 +01:00
Ruben Bridgewater
50dd555910
doc,lib,test: capitalize comment sentences
...
This activates the eslint capitalize comment rule for comments
above 50 characters.
PR-URL: https://github.com/nodejs/node/pull/24996
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-17 17:14:35 +01:00
Ruben Bridgewater
e167ab71fb
benchmark: var to const
...
PR-URL: https://github.com/nodejs/node/pull/13757
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-09-19 21:14:38 -03:00
Matthew Alsup
859ccd78b5
benchmark: remove unused parameters
...
Functions completeConfig, completeRun, and
updateProgress had unused parameters. These
were removed.
PR-URL: https://github.com/nodejs/node/pull/14526
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-31 19:33:18 -07:00
Rich Trott
496f60489d
tools,benchmark: use stricter indentation linting
...
Enable stricter indentation rules for benchmark code.
PR-URL: https://github.com/nodejs/node/pull/13895
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2017-06-27 06:17:06 -07:00
Vse Mozhet Byt
22aa3d4899
benchmark: reduce string concatenations
...
PR-URL: https://github.com/nodejs/node/pull/12455
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-04-20 04:46:37 +03:00
Vse Mozhet Byt
4b841cb0b6
benchmark: harmonize progress bar + stderr output
...
Add a space for minimal readability.
PR-URL: https://github.com/nodejs/node/pull/11925
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-03-21 21:58:18 -07:00
Brian White
a08fcc02f8
benchmark: fix timer display in progress output
...
This commit fixes an issue where the minutes would not display
properly on the benchmark timer once an hour had elapsed.
PR-URL: https://github.com/nodejs/node/pull/11235
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-02-16 16:22:56 -08:00
Joyee Cheung
60d77bd514
benchmark: add progress indicator to compare.js
...
* Print the progress bar and the current benchmark to stderr
when stderr is TTY and stdout is not.
* Allow cli arguments without values via setting.boolArgs
* Add --no-progress option
PR-URL: https://github.com/nodejs/node/pull/10823
Fixes: https://github.com/nodejs/node/issues/8659
Reviewed-By: Andreas Madsen <amwebdk@gmail.com >
2017-01-31 03:03:57 +08:00