-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: fix flaky test-benchmark-util #17473
Conversation
Allow for zero iterations on benchmarks with a short duration.
Example failure without this change: https://ci.nodejs.org/job/node-test-commit-linux/14693/nodes=alpine36-container-x64/consoleFull not ok 157 parallel/test-benchmark-util
---
duration_ms: 4.604
severity: fail
stack: |-
util/format.js
util/format.js type="" n=1: 2,443.7927663734113
util/inspect-array.js
util/inspect-array.js type="" len=100000 n=1: 13.369450815581954
util/inspect-proxy.js
util/inspect-proxy.js n=1: 493.1190172335234
util/inspect.js
util/inspect.js option="none" method="Array" n=1: 44.57330487832981
util/normalize-encoding.js
/home/iojs/build/workspace/node-test-commit-linux/nodes/alpine36-container-x64/benchmark/common.js:202
throw new Error('insufficient clock precision for short benchmark');
^
Error: insufficient clock precision for short benchmark
at Benchmark.end (/home/iojs/build/workspace/node-test-commit-linux/nodes/alpine36-container-x64/benchmark/common.js:202:13)
at main (/home/iojs/build/workspace/node-test-commit-linux/nodes/alpine36-container-x64/benchmark/util/normalize-encoding.js:63:9)
at Benchmark.process.nextTick (/home/iojs/build/workspace/node-test-commit-linux/nodes/alpine36-container-x64/benchmark/common.js:34:28)
at process._tickCallback (internal/process/next_tick.js:155:11)
at Function.Module.runMain (module.js:703:11)
at startup (bootstrap_node.js:195:16)
at bootstrap_node.js:646:3
assert.js:42
throw new errors.AssertionError({
^
AssertionError [ERR_ASSERTION]: 1 strictEqual 0
at ChildProcess.child.on (/home/iojs/build/workspace/node-test-commit-linux/nodes/alpine36-container-x64/test/common/benchmark.js:25:12)
at ChildProcess.emit (events.js:126:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI is happy
plinux failure on CI has to be unrelated but just in case: https://ci.nodejs.org/job/node-test-commit-plinux/13703/ Same for LinuxOne: https://ci.nodejs.org/job/node-test-commit-linuxone/10887/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(CI is good.) |
Landed in 6c0c60c |
Allow for zero iterations on benchmarks with a short duration. PR-URL: nodejs#17473 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Khaidi Chu <[email protected]>
Allow for zero iterations on benchmarks with a short duration. PR-URL: #17473 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Khaidi Chu <[email protected]>
Allow for zero iterations on benchmarks with a short duration. PR-URL: #17473 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Khaidi Chu <[email protected]>
Allow for zero iterations on benchmarks with a short duration.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test benchmark util