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

Clarify (misleading?) bit about parallelism and credit usage in Test Splitting Tutorial #9010

Open
tony-pizza opened this issue Oct 9, 2024 · 2 comments

Comments

@tony-pizza
Copy link

Location

Explanation

This is based on the following assumption:

  • When using parallelism, CircleCI bills for sum total compute time (e.g. 2 parallel runs at 5min counts as 10min of credit usage)

If this assumption is incorrect, please let me know!

Tutorial states you will:

See how test splitting can help decrease pipeline run times and optimize credit usage.

However, I don't feel that the Test Splitting Tutorial really explains how test splitting optimizes credit usage. And, in fact, I believe test splitting would typically increase credit usage, as each parallel run would spend some time doing some test setup or initialization.

Am I missing something here?

@rosieyohannan
Copy link
Contributor

Hello! Thanks for pointing this out @tony-pizza . Agreed, it is misleading and not correct for all. This feature is primarily a speed optimization. I will update the tutorial. My understanding from talking to engineers here is that you can see a reduction in credit usage if a job that is taking a very long time, e.g. and hour . And it gets reduced using parallelism and test splitting down to, say 5 mins.

@KieranP
Copy link

KieranP commented Dec 7, 2024

Yes, I think this confuses people and it needs to be made very clear on the docs. Splitting tests does not reduce the total cumulative time, but infact almost always adds to it. Splitting a 60 minutes into 10 nodes does not mean you will have 10 nodes of 6 minutes (totaling 60 minutes). With the setup overhead, it will end up being more. If the setup overhead for that original 60 minutes is 5 minutes, then splitting it into 10 nodes will result in ten 11 minute runs, or a cumulative 110 minutes, nearly double original 60 minutes. So while your start to finish time goes from 60 minutes to 11 minutes, you end up paying for double the time in CI credits.

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

3 participants