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

New: Configurable List Size For Per-Rule Performance Metrics #13812

Merged
merged 1 commit into from Nov 7, 2020

Conversation

bmish
Copy link
Sponsor Member

@bmish bmish commented Nov 4, 2020

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[X] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Implements RFC: https://github.com/eslint/rfcs/tree/master/designs/2020-timing-list-size

Enables the TIMING environment variable to be set to a larger number or all in order to show a longer list of per-rule performance metrics when running eslint from the command line.

Is there anything you'd like reviewers to focus on?

Interested to hear ideas for improving the test coverage.

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Nov 4, 2020
@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion core Relates to ESLint's core APIs and features feature This change adds a new feature to ESLint and removed triage An ESLint team member will look at this issue soon labels Nov 5, 2020
@mdjermanovic
Copy link
Member

Interested to hear ideas for improving the test coverage.

I think testing getListSize is fine for this PR, since we currently don't have tests for the TIMING feature. Once we add unit tests for timing.js we could also modify the tests from this PR to not call getListSize directly (as it seems that it should be an internal function?).

@bmish
Copy link
Sponsor Member Author

bmish commented Nov 5, 2020

Sounds good.

Another question, should we support both all and ALL as the magic value to remove the limit (basically convert to lowercase before checking it)?

tests/lib/linter/timing.js Outdated Show resolved Hide resolved
tests/lib/linter/timing.js Outdated Show resolved Hide resolved
tests/lib/linter/timing.js Show resolved Hide resolved
@mdjermanovic
Copy link
Member

Another question, should we support both all and ALL as the magic value to remove the limit (basically convert to lowercase before checking it)?

Sounds good to me!

docs/developer-guide/working-with-rules.md Outdated Show resolved Hide resolved
lib/linter/timing.js Show resolved Hide resolved
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit 254e00f into eslint:master Nov 7, 2020
@mdjermanovic
Copy link
Member

Thanks for contributing!

@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators May 7, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion core Relates to ESLint's core APIs and features feature This change adds a new feature to ESLint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants