-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
[Bug]: jest_test rule's performance is not upto the mark #146
Comments
What are your performance expectations in this case? Is it significantly faster outside bazel with other rulesets? If 200 modules are tested in only 3x the time as 1 module that seems very efficient, or am I misunderstanding those numbers? |
Hi @jbedard, Sorry if I was unclear. This is what I'm saying :
My assumption is that regardless of how we run in Bazel (parallel/exclusive), the specific module will take around the same amount of time. But according to my observation, bazel takes more time when we use parallelism & performs best when we run exclusively with respect to the single module execution time.
|
I assume it's just from general performance gains and losses that come with parallelization. Bazel will estimate the best number of jobs to parallelize, but it's just a best-guess or estimate. You can give hints about targets such as I assume running all your tests in parallel is still faster then sequentially though? |
Thanks for the info @jbedard. Yes, running all tests in parallel is still faster than sequential runs as a whole. The only concern is, sometimes parallel runs getting |
If those tests exceed the timeout when run in parallel should the timeout be increased? Or maybe the tests split into multiple targets (or sharding might accomplish the same in this case?). |
Yes, it seems like a good idea to separate testing into various targets. |
Can we close this issue and continue the discussion there then? |
What happened?
We have around 200 modules/packages that have jest tests. All of these modules must run around 58K jest tests.
We enable the Bazel test target for each module using the jest_test rule, as seen below.
bazel test //module_1:jest_test
(It has around 4000 jest tests.)bazel test //module_2:jest_test
bazel test //module_200:jest_test
When I attempt to start jest_test for a certain module, it runs quite quickly.
Example:
When I try to run jest_test across all modules, the bazel parallelization kicks in and the performance for module level targets suffers.
Example:
Version
Development (host) and target OS/architectures:
Output of
bazel --version
: bazel 6.1.0Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file: rules_jest-0.18.4Language(s) and/or frameworks involved: Jest Framework
How to reproduce
Any other information?
No response
The text was updated successfully, but these errors were encountered: