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: improve --filter pattern matching #29987

Closed
wants to merge 1 commit into from

Conversation

mmarchini
Copy link
Contributor

@mmarchini mmarchini commented Oct 15, 2019

  • Let users provide more than one pattern separated by :
  • Let users provide a exclude pattern prefixed with !
  • Add tests for --filter
  • Document --filter
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@mmarchini mmarchini added the benchmark Issues and PRs related to the benchmark subsystem. label Oct 15, 2019
@mscdex
Copy link
Contributor

mscdex commented Oct 15, 2019

I would prefer just allowing multiple --filter flags instead. That would match with how existing flags like --set work.

@mmarchini
Copy link
Contributor Author

@mscdex that makes sense, I'll update the PR. Any thoughts on using ! to exclude benchmarks matching the pattern?

@mmarchini
Copy link
Contributor Author

Ugh, I forgot ! doesn't work well inside double quotes (I was using single quotes while testing). Google Test uses -, let me see if I can make it work instead of !.

@mmarchini
Copy link
Contributor Author

PR updated to allow multiple --filter instead of using : as a separator and to use - instead of !. Also fixed a small bug on the argument parsing.

@Trott
Copy link
Member

Trott commented Oct 19, 2019

@nodejs/collaborators This could use some reviews.

@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Oct 19, 2019

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Oct 19, 2019

test/parallel/test-benchmark-cli.js Outdated Show resolved Hide resolved
test/parallel/test-benchmark-cli.js Outdated Show resolved Hide resolved
benchmark/compare.js Show resolved Hide resolved
benchmark/_cli.js Outdated Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

@mmarchini
Copy link
Contributor Author

@lundibundi done, thank you for your suggestions :)

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

benchmark/_cli.js Outdated Show resolved Hide resolved
  * Let users provide more than one pattern by repeating the flag
  * Add new flag --exclude to exclude patterns
  * Add tests for --filter
  * Document --filter

This commit also fixes a bug where things like
`compare.js --new --old binary --new binary` was acceptable (now the
script will exit and print the usage message).
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@lundibundi lundibundi left a comment

Choose a reason for hiding this comment

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

LGTM

benchmark/_cli.js Show resolved Hide resolved
benchmark/_cli.js Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

@lundibundi lundibundi added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 10, 2019
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@mmarchini
Copy link
Contributor Author

Rebuilding ARM, although it seems to be broken everywhere (I saw the same errors in other PR builds): https://ci.nodejs.org/job/node-test-commit-arm/28083/

@mmarchini
Copy link
Contributor Author

I opened #30890 to track the failures on ARM, since it doesn't seem related to this PR (the same failures are happening in other PRs). Landing.

@mmarchini
Copy link
Contributor Author

mmarchini commented Dec 10, 2019

Landed in a4e7ea8

@mmarchini mmarchini closed this Dec 10, 2019
mmarchini added a commit that referenced this pull request Dec 10, 2019
  * Let users provide more than one pattern by repeating the flag
  * Add new flag --exclude to exclude patterns
  * Add tests for --filter
  * Document --filter

This commit also fixes a bug where things like
`compare.js --new --old binary --new binary` was acceptable (now the
script will exit and print the usage message).

PR-URL: #29987
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@nodejs-github-bot
Copy link
Collaborator

targos pushed a commit that referenced this pull request Dec 11, 2019
  * Let users provide more than one pattern by repeating the flag
  * Add new flag --exclude to exclude patterns
  * Add tests for --filter
  * Document --filter

This commit also fixes a bug where things like
`compare.js --new --old binary --new binary` was acceptable (now the
script will exit and print the usage message).

PR-URL: #29987
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Dec 13, 2019
targos pushed a commit that referenced this pull request Jan 14, 2020
  * Let users provide more than one pattern by repeating the flag
  * Add new flag --exclude to exclude patterns
  * Add tests for --filter
  * Document --filter

This commit also fixes a bug where things like
`compare.js --new --old binary --new binary` was acceptable (now the
script will exit and print the usage message).

PR-URL: #29987
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
BethGriggs pushed a commit that referenced this pull request Feb 6, 2020
  * Let users provide more than one pattern by repeating the flag
  * Add new flag --exclude to exclude patterns
  * Add tests for --filter
  * Document --filter

This commit also fixes a bug where things like
`compare.js --new --old binary --new binary` was acceptable (now the
script will exit and print the usage message).

PR-URL: #29987
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Feb 8, 2020
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 pending requests for changes, and a CI started. benchmark Issues and PRs related to the benchmark subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants