Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

codeceptjs run-workers X can do with sequencing improvements

Aperta
#4,250 6 commenti 2 reazioni 1 assegnatario Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

stale
What are you trying to achieve?

codeceptjs run-workers 5 should be more performant and pull tests from a pool instead of having each test pre-assigned to a thread

What do you get instead?

Currently run-workers will create a pool of all tests when codeceptjs run-workers 5 is executed.

It then pre-assigns each test to a CPU thread and starts running all tests assigned to each thread.

This creates an even distribution of tests per thread. The problem is that not all tests are equal in terms of runtime

Small sample from end of test execution

[01]   ✔ in 4354ms
[04]   ✔ in 4794ms
[02]   ✔ in 3328ms
[04]   ✔ in 7131ms
[03]   ✔ in 13437ms
[01]   ✔ in 11558ms
[05]   ✔ in 21881ms
[02]   ✔ in 7051ms
[02]   ✔ in 4259ms
[03]   ✔ in 15055ms
[02]   ✔ in 5372ms
[03]   ✔ in 5274ms
[03]   ✔ in 17304ms

If all tests in thread 1 would complete in 2 minutes, then thread 1 would not pick up any more tests even if thread 2 - 5 have 6 tests all still waiting in their queue. This means that tests are only as fast as the slowest thread rather than allowing tests to be picked up by an idle thread.

In the example above thread 02 and 03 were slower than others. thread 01, 04 and 05 were waiting in idle while 02 and 03 were continuing with their queue.

In an ideal world, thread 01, 04 or 05 would see this incomplete queue and pick up a task to speed up test performance.

Details
  • CodeceptJS version: 3.5.3
  • NodeJS Version: 18
  • Operating System: MacOS / Linux
  • puppeteer
Lingua principale
JavaScript
Stelle
4.2k
Fork
756
Merge medio
2g 9h
PR unite (30g)
16

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codeceptjs/CodeceptJS

Tutte le issue di codeceptjs/CodeceptJS

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.