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

Performance considerations #9

Open
mpizenberg opened this issue Apr 23, 2020 · 0 comments
Open

Performance considerations #9

mpizenberg opened this issue Apr 23, 2020 · 0 comments

Comments

@mpizenberg
Copy link
Owner

mpizenberg commented Apr 23, 2020

Currently, the design of the supervisor and runners is very straightforward and generic: give one test to each worker. When a worker sends a result, give it another test and transfer the result to reporter.

This design has the potential drawback of much message passing between supervisor and workers (two per test basically). Node-test-runner is using another strategy consisting of splitting the tests in subsets and give each subset to a worker. Workers only respond when finished. This also has drawbacks, namely code complexity and potential unbalanced work load between subsets. Using a work-stealing queue could also reduce the amount of messages (but not guaranteed since communication is needed to transfer work).

Another optimization that would be cool to do is the case of --workers 0 (or --workers 1?). It could be a special case where everything is run in the main thread and no worker is spawned. It has multiple performance advantages for small to medium tests suites, and also probably for CI. Only huge tests suites with many fuzz tests should benefit from a multi-worker architecture in my opinion. To be verified.

  1. The tests can be run in one go. No need to exchange with supervisor and wait for another order.
  2. The TestResult do not have to be serialized and de-serialized between runner and reporter.
  3. Only one Elm main is compiled instead of two (runner and reporter).

But as with all performance matters, measure first!

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

No branches or pull requests

1 participant