Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6369 +/- ##
========================================
Coverage 84.12% 84.12%
========================================
Files 356 356
Lines 38445 38445
Branches 10888 10787 -101
========================================
Hits 32340 32340
Misses 5676 5676
Partials 429 429 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
They used to start only after everything else had finished, even though they are the slowest task. Starting them first lets them overlap with the browser tests and the linters.
These tests only read from the session, so reloading the profile and listing the markers before each of them was wasted work. This takes the file from about 11.7s to 2s.
basic.test.ts had grown to 39 tests that each start a daemon, and since Jest only parallelizes across files, it took about 18s on its own and was the longest task in test-all. The save, filter, limit and strategy tests now live in their own files, so the longest file takes about 5s.
…tarting test The test read samply's pid file right after the client gave up, so the load timeout had to be long enough for the fake samply to start, and the test spent 2s doing nothing. Waiting for the pid file removes that race, so the timeout only needs to be long enough for the client to give up. This takes the test from about 1.3s to 0.35s.
canova
force-pushed
the
optimize-cli-tests
branch
from
October 1, 2026 11:12
23ebe86 to
f58f2fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Main | Deploy preview
Fixes #6368.
yarn test-alltook about 24.5s locally, and most of that was the profiler-cli tests. They only started after every other task had finished, andbasic.test.tstook 18-19s on its own because its 39 tests each start a daemon and run one after another.This PR brings
test-alldown to ~7.8s from ~24.5s locally:test-cliin parallel duringtest-allinstead of after itmarker-info.test.ts, since all of its tests only read from the session (that file went from 11.7s -> 2s).basic.test.tsintobasic,profile-save,filters,limitsandstrategyso Jest can run them in parallel. The test bodies are unchanged. Thebasic.test.tsfile was the longest running file in CLI tests.We could probably shave the CLI tests down further, but it wouldn't buy us much.
yarn testalone takes about 6s and runs alongside them, so it's the limit now.yarn test-clialso takes about 6s alone locally now.One important thing is that now the CLI tests run in parallel with the
yarn test. I don't remember why we made it that way initially, but I couldn't find any reason to do now. So I think it's fine, but we might want to keep that in mind in case something breaks.