Skip to content
compiler.dev

Test sharding planner

Paste your slowest test files with their durations, choose how many parallel shards you want, and get a balanced split with the expected wall-clock time.

Expected wall time
9m 8s
serial: 31m 33s
Speedup
3.45x
Balance
98%
100% is perfect
ShardTestsTest timeWith setupContents
137m 32s9m 2ssearch/index.test.ts, auth/login.test.ts, api/users.test.ts
237m 24s8m 54se2e/smoke.test.ts, billing/refund.test.ts, billing/tax.test.ts
347m 38s9m 8sbilling/invoice.test.ts, ui/dashboard.test.ts, api/webhooks.test.ts, ui/settings.test.ts
447m 29s8m 59sui/checkout.test.ts, api/orders.test.ts, search/query.test.ts, auth/session.test.ts

Everything runs in your browser; nothing you type is sent anywhere.

How to use it

  1. Paste one test per line as name and seconds. Most test runners can print per-file timings.
  2. Set the number of shards and the fixed overhead each shard pays for checkout, install and warm-up.
  3. Use the shard lists to configure your matrix, then compare the expected wall time with your current run.

Frequently asked questions

How are shards balanced?

With the longest-processing-time-first rule: sort tests from longest to shortest and always add the next one to the least loaded shard. It is simple and within a third of optimal in the worst case.

Why doesn't doubling shards halve the time?

Every shard repeats the fixed setup (checkout, install, build), and a single long test caps how short any shard can be.

What does sharding do to my bill?

You pay for every shard's setup, so minutes go up even though wall time goes down. Use the overhead field to see the trade-off.

How do I shard in Jest, Playwright or pytest?

Jest and Playwright have --shard=i/n, and pytest has plugins like pytest-split. Use this plan if you need duration-aware splits rather than count-based ones.