WIP: use Node built-in test runner with concurrency #3650
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This seems to mostly work. At least, it works for to-upstream web platform tests, going from 18.7 seconds (Node.js built-in runner, no concurrency) to 9.7 seconds (Node.js built-in runner, concurrency) on my system.
For normal web platform tests, I tried
{ concurrency: true }
(equivalent to{ concurrency: 31 }
on my system) and it hung for a long time, before outputting a ton of failures, but also a good amount of successes. Most of the failures were ECONNREFUSED against the web platform tests server, i.e., I was probably DOSing myself. I'm trying{ concurrency: 4 }
now and results are streaming in, in a way that suggests they're being chunked and done concurrently. Maybe I can even bump it up?{ concurrency: 8 }
seemed to blow up though.I'd want to do some more thorough measurements to make sure this gives a speedup as expected. E.g. run the whole suite, comparing Mocha vs. Node.js built-in runner vs. Node.js built-in runner without concurrency, more than one time.
More experimentation needed. And we'd want to port the whole suite away from Mocha, not just WPTs. Although obviously speeding up WPT execution time is highly impactful.