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: more tests to confirm benchmark code isn't broken #14951

Closed
wants to merge 5 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Aug 20, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test benchmark

@Trott Trott added benchmark Issues and PRs related to the benchmark subsystem. test Issues and PRs related to the tests. labels Aug 20, 2017

require('../common');

// Minimal test for domain benchmarks. This makes sure the benchmarks aren't
Copy link
Member

Choose a reason for hiding this comment

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

That file is still a copy of the test-benchmark-domain

Copy link
Member Author

Choose a reason for hiding this comment

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

Yikes, fixed, thanks.

const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js');
const argv = ['--set', 'arguments=0',
'--set', 'n=1',
'domain'];
Copy link
Contributor

Choose a reason for hiding this comment

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

here also

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed, thanks!

'--set', 'path=',
'--set', 'pathext=',
'--set', 'paths=',
'path'];
Copy link
Contributor

Choose a reason for hiding this comment

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

You can add:

              '--set', 'props=',

to further reduce iterations

Copy link
Member Author

Choose a reason for hiding this comment

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

The two benchmarks that have props each seem to have a single entry only. Are you suggesting adding props= to future-proof things in case more entries are added later to the benchmarks? (Seems like a good idea to me. Making sure I'm not misunderstanding your suggestion.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Went and added it. Thanks.

Add minimal test to confirm that domain benchmarks run.
Add minimal test to confirm that events benchmarks run.
Add minimal test to confirm that os benchmarks run.
Add minimal test to confirm that path benchmarks run.
Add minimal test to confirm that process benchmarks run.
@Trott
Copy link
Member Author

Trott commented Aug 24, 2017

@maclover7
Copy link
Contributor

Is it worth it to create an internal common.runBenchmark-type function to abstract away most of this logic? It seems like the majority of each test file is shared/duplicated, with the exception of setting a few options.

@Trott
Copy link
Member Author

Trott commented Aug 24, 2017

Is it worth it to create an internal common.runBenchmark-type function to abstract away most of this logic? It seems like the majority of each test file is shared/duplicated, with the exception of setting a few options.

A case could certainly be made. I'm generally resistant to adding more functions to common/index.js unless it's something that will be truly ubiquitous in our tests. But a benchmark-testing specific module in the common directory is something I could get behind.

@maclover7
Copy link
Contributor

But a benchmark-testing specific module in the common directory is something I could get behind.

Agree -- was envisioning something similar to the way the DNS tests have a separate module for their shared logic.

Is it best to open up a new PR for this change (before/after this PR is merged?) to further discuss the idea, or for the change to go along with this one?

@Trott
Copy link
Member Author

Trott commented Aug 24, 2017

@maclover7 I'd say separate PR. I'm literally seconds away from landing this one. :-D

(I assume this is something you want to tackle.)

Trott added a commit to Trott/io.js that referenced this pull request Aug 24, 2017
Add minimal test to confirm that domain benchmarks run.

PR-URL: nodejs#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request Aug 24, 2017
Add minimal test to confirm that events benchmarks run.

PR-URL: nodejs#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request Aug 24, 2017
Add minimal test to confirm that os benchmarks run.

PR-URL: nodejs#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request Aug 24, 2017
Add minimal test to confirm that path benchmarks run.

PR-URL: nodejs#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request Aug 24, 2017
Add minimal test to confirm that process benchmarks run.

PR-URL: nodejs#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott
Copy link
Member Author

Trott commented Aug 24, 2017

Landed in 3fcfca6, afa62a2,, dd60c60, and ce69d01 and 3cf27f1

@Trott Trott closed this Aug 24, 2017
addaleax pushed a commit to addaleax/ayo that referenced this pull request Aug 25, 2017
Add minimal test to confirm that domain benchmarks run.

PR-URL: nodejs/node#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Aug 25, 2017
Add minimal test to confirm that events benchmarks run.

PR-URL: nodejs/node#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Aug 25, 2017
Add minimal test to confirm that os benchmarks run.

PR-URL: nodejs/node#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Aug 25, 2017
Add minimal test to confirm that path benchmarks run.

PR-URL: nodejs/node#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Aug 25, 2017
Add minimal test to confirm that process benchmarks run.

PR-URL: nodejs/node#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Aug 28, 2017
Add minimal test to confirm that domain benchmarks run.

PR-URL: nodejs/node#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Aug 28, 2017
Add minimal test to confirm that events benchmarks run.

PR-URL: nodejs/node#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Aug 28, 2017
Add minimal test to confirm that os benchmarks run.

PR-URL: nodejs/node#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Aug 28, 2017
Add minimal test to confirm that path benchmarks run.

PR-URL: nodejs/node#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Aug 28, 2017
Add minimal test to confirm that process benchmarks run.

PR-URL: nodejs/node#14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
Add minimal test to confirm that domain benchmarks run.

PR-URL: #14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
Add minimal test to confirm that events benchmarks run.

PR-URL: #14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
Add minimal test to confirm that os benchmarks run.

PR-URL: #14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
Add minimal test to confirm that path benchmarks run.

PR-URL: #14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
Add minimal test to confirm that process benchmarks run.

PR-URL: #14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Sep 10, 2017
MylesBorins pushed a commit that referenced this pull request Sep 12, 2017
Add minimal test to confirm that domain benchmarks run.

PR-URL: #14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 12, 2017
Add minimal test to confirm that events benchmarks run.

PR-URL: #14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 12, 2017
Add minimal test to confirm that os benchmarks run.

PR-URL: #14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 12, 2017
Add minimal test to confirm that path benchmarks run.

PR-URL: #14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Sep 12, 2017
Add minimal test to confirm that process benchmarks run.

PR-URL: #14951
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins
Copy link
Contributor

@Trott all of these rely on benchmark having run.js

Should we backport this?

@Trott
Copy link
Member Author

Trott commented Sep 25, 2017

Should we backport this?

Not worth it IMO. I'll add dont-land labels.

@Trott Trott deleted the test-benchmark-domain 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. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants