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

Comment about GParsPool #1

Open
felipecao opened this issue Feb 4, 2016 · 1 comment
Open

Comment about GParsPool #1

felipecao opened this issue Feb 4, 2016 · 1 comment

Comments

@felipecao
Copy link

Hey, @camiloribeiro, really nice example! I'm using it in a project I'm working on, thanks a lot for posting this!

BTW, this is not supposed to be an issue, it's more like just a comment on a minor glitch, but I couldn't find a better way to add such a comment besides via an issue, feel free to close it, ok? :)

My comment is about the usage of GParsPool. In your example, where you have 9 feature files, using a pool with 10 threads works like a charm. But since GPars waits for all threads to finish before assigning a new thread to a new element, it might be interesting to establish a balance between the number of threads you open and the number of features to be run.

For instance, if you had 11 features, where both the first one and the last one are really fast, and the ones in between vary in speed, in a pool with 10 threads the 11th feature would be blocked until the other 10 other features finished running, even though it's fast. So, in such a case, it might be interesting to have a pool with 3 threads, so that you reduce the amount of time wasted by threads that are blocked, waiting for others to finish.

All the best!
Felipe

@Neal910
Copy link

Neal910 commented Mar 1, 2017

Hi @felipecao ,
Thanks for your explanation on this threads number optimization. If I understood correctly, you meant as following:
If I have three selenium nodes waiting for get test requests and run the tests, then I don't have to set threads number more than 3, because they will wait there anyway.

In case you are not familiar with selenium grid, selenium node can be treated just as a browser to run the UI test.

Thanks,

Feng

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

2 participants