Split by timing parallelism does not seem to balance out

It kind of seem to be getting worse as of late. We have run probably 20-30 builds with the imbalanced run time now, thinking it would improve but it does not seem to be.

export CI_TESTFILES_UNIT=$(circleci tests glob "test/**/*.js" | circleci tests split --split-by=timings)

I have found out the reason.

It is because hooks are not reported in the timing report.

Iā€™m using Node.js mocha.

I am facing the same issue - did you manage to fix it?

Yes I have.

For my issue, it was due to 2 things:

  1. Firstly, hooks are not included as part of the timing report. Some of my tests have pretty heavy hooks (before()) but fairly quick test, the time in hooks are not included.

  2. 2nd issue is that junit reporter is using full path in the timing report, whereas circleci tests split is using relative path. What we end up doing is to strip away the full paths from the report before storing it, e.g.: sed -i 's/\/home\/circleci\/repo\///g' junit/test-results.xml.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.