Skip to content
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

benchmark: remove writing to benchmark directory #16144

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Oct 11, 2017

A benchmark for module loading creates a temporary directory in the
benchmark directory. Re-use the test common module to put the tmp
directory in test instead. This was causing intermittent test failures
because run.js (invoked by benchmark tests, mulitple of which could be
running at once) throws if a subdirectory of benchmark disappears at
just the wrong time.

There are other possible solutions than repurposing the test/common
module but two arguments for doing it this way are:

  • There is already another benchmark file that does this
    (http_server_for_chunky_client.js) so the dependency already exists
    in the benchmarks.
  • This also eliminates a re-implementation of rimraf in the benchmark
    code.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test benchmark

@Trott Trott added benchmark Issues and PRs related to the benchmark subsystem. flaky-test Issues and PRs related to the tests with unstable failures on the CI. test Issues and PRs related to the tests. labels Oct 11, 2017
@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to the benchmark subsystem. module Issues and PRs related to the module subsystem. labels Oct 11, 2017
@joyeecheung
Copy link
Member

@Trott
Copy link
Member Author

Trott commented Oct 11, 2017

The linter and arm issue in CI are unrelated, but since I (think) we just fixed both of them:

CI: https://ci.nodejs.org/job/node-test-pull-request/10620/

Er... I mean: CI: https://ci.nodejs.org/job/node-test-pull-request/10621/

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@mhdawson
Copy link
Member

I see CI run was good, but still waiting on 48 hours to land.

A benchmark for module loading creates a temporary directory in the
benchmark directory. Re-use the test common module to put the tmp
directory in test instead. This was causing intermittent test failures
because run.js (invoked by benchmark tests, mulitple of which could be
running at once) throws if a subdirectory of benchmark disappears at
just the wrong time.

There are other possible solutions than repurposing the `test/common`
module but two arguments for doing it this way are:

* There is already another benchmark file that does this
  (`http_server_for_chunky_client.js`) so the dependency already exists
  in the benchmarks.
* This also eliminates a re-implementation of rimraf in the benchmark
  code.
jasnell pushed a commit that referenced this pull request Oct 13, 2017
A benchmark for module loading creates a temporary directory in the
benchmark directory. Re-use the test common module to put the tmp
directory in test instead. This was causing intermittent test failures
because run.js (invoked by benchmark tests, mulitple of which could be
running at once) throws if a subdirectory of benchmark disappears at
just the wrong time.

There are other possible solutions than repurposing the `test/common`
module but two arguments for doing it this way are:

* There is already another benchmark file that does this
  (`http_server_for_chunky_client.js`) so the dependency already exists
  in the benchmarks.
* This also eliminates a re-implementation of rimraf in the benchmark
  code.

PR-URL: #16144
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@jasnell
Copy link
Member

jasnell commented Oct 13, 2017

Landed in c2cf47a

@jasnell jasnell closed this Oct 13, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 15, 2017
A benchmark for module loading creates a temporary directory in the
benchmark directory. Re-use the test common module to put the tmp
directory in test instead. This was causing intermittent test failures
because run.js (invoked by benchmark tests, mulitple of which could be
running at once) throws if a subdirectory of benchmark disappears at
just the wrong time.

There are other possible solutions than repurposing the `test/common`
module but two arguments for doing it this way are:

* There is already another benchmark file that does this
  (`http_server_for_chunky_client.js`) so the dependency already exists
  in the benchmarks.
* This also eliminates a re-implementation of rimraf in the benchmark
  code.

PR-URL: nodejs/node#16144
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Oct 18, 2017
A benchmark for module loading creates a temporary directory in the
benchmark directory. Re-use the test common module to put the tmp
directory in test instead. This was causing intermittent test failures
because run.js (invoked by benchmark tests, mulitple of which could be
running at once) throws if a subdirectory of benchmark disappears at
just the wrong time.

There are other possible solutions than repurposing the `test/common`
module but two arguments for doing it this way are:

* There is already another benchmark file that does this
  (`http_server_for_chunky_client.js`) so the dependency already exists
  in the benchmarks.
* This also eliminates a re-implementation of rimraf in the benchmark
  code.

PR-URL: #16144
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott Trott deleted the fix-bench-module branch January 13, 2022 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark Issues and PRs related to the benchmark subsystem. flaky-test Issues and PRs related to the tests with unstable failures on the CI. module Issues and PRs related to the module subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants