FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: make test-perf-hooks more robust and work with workers by joyeecheung · Pull Request #49197 · nodejs/node · GitHub

/ node Public

test: make test-perf-hooks more robust and work with workers - #49197

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
joyeecheung:perf-hook-test
Aug 18, 2023
Merged

test: make test-perf-hooks more robust and work with workers#49197
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
joyeecheung:perf-hook-test

Conversation

joyeecheung commented Aug 16, 2023
edited
Loading

Copy link
Copy Markdown
Member

Previously the test makes several assumptions about the absolute values of the nodeTiming fields, which can make the test flaky on slow machines. This patch rewrites the test to check the relative values instead. It also updates the test to make it work with workers instead of directly skipping in workers.

Refs: nodejs/reliability#638

Previously the test makes several assumptions about the absolute
values of the nodeTiming fields, which can make the test flaky
on slow machines. This patch rewrites the test to check the
relative values instead. It also updates the test to make it
work with workers instead of directly skipping in workers.
joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 16, 2023
nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Aug 16, 2023

Copy link
Copy Markdown
Member Author

From nodejs/reliability#638 this test has been failing 6 recent PRs, hopefully this makes the flake go away..

Reason sequential/test-perf-hooks
Type JS_TEST_FAILURE
Failed PR 6 (#49104, #49127, #49149, #49162, #49164, #46391)
Appeared test-equinix-ubuntu1804_container-arm64-2, test-osuosl-ubuntu2004_sharedlibs_container-arm64-1, test-osuosl-ubuntu2004_container-armv7l-1, test-equinix-ubuntu2004_container-armv7l-2, test-azure_msft-win11_vs2022-arm64-4, test-equinix-ubuntu2004_container-arm64-2
First CI https://ci.nodejs.org/job/node-test-pull-request/53267/
Last CI https://ci.nodejs.org/job/node-test-pull-request/53336/
Example
not ok 3928 sequential/test-perf-hooks
  ---
  duration_ms: 426.79600
  severity: fail
  exitcode: 1
  stack: |-
    {
      name: 'node',
      entryType: 'node',
      startTime: 0,
      duration: { around: 285.6393041610718 },
      nodeStart: { around: 0 },
      v8Start: { around: 0 },
      bootstrapComplete: { around: 285.5992240905762, delay: 2500 },
      environment: { around: 0 },
      loopStart: -1,
      loopExit: -1
    }
    node:assert:399
        throw err;
        ^
    
    AssertionError [ERR_ASSERTION]: environment: 252.57520198822021 >= 250
        at checkNodeTiming (/home/iojs/build/workspace/node-test-commit-arm/test/sequential/test-perf-hooks.js:31:7)
        at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-arm/test/sequential/test-perf-hooks.js:43:1)
        at Module._compile (node:internal/modules/cjs/loader:1241:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
        at Module.load (node:internal/modules/cjs/loader:1091:32)
   ...

github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 16, 2023

Copy link
Copy Markdown
Collaborator

debadree25 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks great!
Thank you!

debadree25 added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Aug 16, 2023

Copy link
Copy Markdown
Contributor

i tried stress testing this too locally with python3 tools/test.py test/sequential/test-perf-hooks.js --repeat 50 -j10 it passed well! so maybe could graduate to parallel too?

joyeecheung commented Aug 16, 2023
edited
Loading

Copy link
Copy Markdown
Member Author

I am not sure why it was in sequential in the first place, but I think on the safe side we can just keep it there in this PR and if it looks well in the CI, move it to parallel afterwards (otherwise one doesn't know which is causing a regression if there is a regression).

Copy link
Copy Markdown
Contributor

Yeah makes sense!

// Use a fairly large epsilon value, since we can only guarantee that the node
// process started up in 15 seconds.
assert(Math.abs(performance.timeOrigin - Date.now()) < 15000);
assert(testStartTime < 15000, `${testStartTime} >= 15000`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit

Suggested change
assert(testStartTime < 15000, `${testStartTime} >= 15000`);
assert(testStartTime < 15000, `${testStartTime} 15000`);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think in general we use >= in this codebase instead?

joyeecheung added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 18, 2023

joyeecheung commented Aug 18, 2023
edited
Loading

Copy link
Copy Markdown
Member Author

nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 18, 2023
nodejs-github-bot merged commit ecde9d9 into nodejs:main Aug 18, 2023

Copy link
Copy Markdown
Collaborator

Landed in ecde9d9

UlisesGascon pushed a commit that referenced this pull request Sep 10, 2023
Previously the test makes several assumptions about the absolute
values of the nodeTiming fields, which can make the test flaky
on slow machines. This patch rewrites the test to check the
relative values instead. It also updates the test to make it
work with workers instead of directly skipping in workers.

PR-URL: #49197
Refs: nodejs/reliability#638
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
UlisesGascon mentioned this pull request Sep 10, 2023
targos pushed a commit that referenced this pull request Nov 27, 2023
Previously the test makes several assumptions about the absolute
values of the nodeTiming fields, which can make the test flaky
on slow machines. This patch rewrites the test to check the
relative values instead. It also updates the test to make it
work with workers instead of directly skipping in workers.

PR-URL: #49197
Refs: nodejs/reliability#638
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Previously the test makes several assumptions about the absolute
values of the nodeTiming fields, which can make the test flaky
on slow machines. This patch rewrites the test to check the
relative values instead. It also updates the test to make it
work with workers instead of directly skipping in workers.

PR-URL: nodejs/node#49197
Refs: nodejs/reliability#638
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
sercher added a commit to sercher/graaljs that referenced this pull request Apr 25, 2024
Previously the test makes several assumptions about the absolute
values of the nodeTiming fields, which can make the test flaky
on slow machines. This patch rewrites the test to check the
relative values instead. It also updates the test to make it
work with workers instead of directly skipping in workers.

PR-URL: nodejs/node#49197
Refs: nodejs/reliability#638
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL