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

Long run monitoring #904

Merged
merged 3 commits into from
Sep 9, 2022
Merged

Conversation

connectdotz
Copy link
Collaborator

@connectdotz connectdotz commented Sep 9, 2022

Motivation:

One of the most common complaints is the extension seems to consume lots of resources. Given the extension is just a thin wrapper over jest, many of those issues most likely could be addressed by changing the settings, such as jest.autoRun. This PR is to add proactive monitoring to inform users when the seemingly long run (defined by the new setting jest.monitorLongRun) is detected, and provide info to help users address it.

Change outline

  • add a new setting jest.monitorLongRun to control the threshold of the long-run detection.
  • update reporters to report more info for more helpful messaging.
  • create a new event for long-run detection
  • add a LongRunMonitor in RunTestListener to monitor runs that exceed the configured threshold (jest.monitorLongRun)
  • display a warning message when long-run is detected
  • updated README

Follow-up

Right now the default setting of the monitor is 60000ms, i.e. 1 minute. Not sure if this is sufficient or becoming too annoying for some users... Let's observe the pre-release response.

@coveralls
Copy link

coveralls commented Sep 9, 2022

Pull Request Test Coverage Report for Build 3025010421

  • 63 of 63 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 95.584%

Totals Coverage Status
Change from base Build 2996051765: 0.09%
Covered Lines: 2681
Relevant Lines: 2746

💛 - Coveralls

@connectdotz connectdotz merged commit 6a6fe53 into jest-community:master Sep 9, 2022
@connectdotz connectdotz deleted the long-run-warning branch September 9, 2022 20:09
legend1202 pushed a commit to legend1202/vscode-jest that referenced this pull request Jun 18, 2023
* enhance reporters

* adding long run monitoring

* fix eslint error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants