Skip to content

fix: ensure concurrency for multiple inputs #973

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

Merged
merged 6 commits into from
Mar 19, 2025
Merged

fix: ensure concurrency for multiple inputs #973

merged 6 commits into from
Mar 19, 2025

Conversation

wellwelwel
Copy link
Owner

@wellwelwel wellwelwel commented Mar 19, 2025

Fixes #958.


When multiple inputs are specified, the concurrency limit between the inputs isn't respected. For example:

poku dirA dirB
  • Before this PR, directories A and B will be triggered at the same time, where each one will perform the concurrency limit between their files, but not between each other.

@wellwelwel-bot
Copy link

wellwelwel-bot bot commented Mar 19, 2025

🎖️ Benchmarks

🏃🏻‍♀️ 1/4 Execution Tests

Note

Focuses solely in execution, using a simple assert(true) or assert(false) from Node.js and searches for files in four levels of depth.

  • success: a suite of 5 tests that will pass.
  • failure: a suite of 5 tests that will fail.
  • balanced: a suite of 10 tests where 5 tests will fail and 5 tests will pass.
See Results

🃏 Jest

  • success
  🐷 Poku (3307eaa) ran
    5.34 ± 0.17 times faster than jest
See commands
source
node --experimental-vm-modules ./node_modules/jest/bin/jest.js "./test/execution/success/jest"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/success/poku"
  • failure
  🐷 Poku (3307eaa) ran
    5.46 ± 0.19 times faster than jest
See commands
source
node --experimental-vm-modules ./node_modules/jest/bin/jest.js "./test/execution/failure/jest"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/failure/poku"
  • balanced
  🐷 Poku (3307eaa) ran
    4.36 ± 0.15 times faster than jest
See commands
source
node --experimental-vm-modules ./node_modules/jest/bin/jest.js "./test/execution/balanced/jest"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/balanced/poku"

⚡️ Vitest

  • success
  🐷 Poku (3307eaa) ran
    4.70 ± 0.20 times faster than vitest
See commands
source
node ./node_modules/vitest/vitest.mjs run "./test/execution/success/vitest"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/success/poku"
  • failure
  🐷 Poku (3307eaa) ran
    4.61 ± 0.17 times faster than vitest
See commands
source
node ./node_modules/vitest/vitest.mjs run "./test/execution/failure/vitest"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/failure/poku"
  • balanced
  🐷 Poku (3307eaa) ran
    4.49 ± 0.07 times faster than vitest
See commands
source
node ./node_modules/vitest/vitest.mjs run "./test/execution/balanced/vitest"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/balanced/poku"

☕️ Mocha

  • success
  🐷 Poku (3307eaa) ran
    1.87 ± 0.04 times faster than mocha
See commands
source
node ./node_modules/mocha/bin/mocha.js --parallel "./test/execution/success/mocha/**"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/success/poku"
  • failure
  🐷 Poku (3307eaa) ran
    1.84 ± 0.08 times faster than mocha
See commands
source
node ./node_modules/mocha/bin/mocha.js --parallel "./test/execution/failure/mocha/**"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/failure/poku"
  • balanced
  🐷 Poku (3307eaa) ran
    1.14 ± 0.02 times faster than mocha
See commands
source
node ./node_modules/mocha/bin/mocha.js --parallel "./test/execution/balanced/mocha/**"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/balanced/poku"

🐢 Node.js (built-in)

  • success
  node ran
    1.12 ± 0.04 times faster than 🐷 Poku (3307eaa)
See commands
source
node --test "./test/execution/success/node/**/**.spec.js"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/success/poku"
  • failure
  node ran
    1.10 ± 0.04 times faster than 🐷 Poku (3307eaa)
See commands
source
node --test "./test/execution/failure/node/**/**.spec.js"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/failure/poku"
  • balanced
  node ran
    1.08 ± 0.03 times faster than 🐷 Poku (3307eaa)
See commands
source
node --test "./test/execution/balanced/node/**/**.spec.js"
poku
node ./node_modules/poku/lib/bin/index.js "./test/execution/balanced/poku"

Important

Please take into consideration that benchmarks do not indicate the competitiveness of one over the other; rather, they serve as a metric to monitor and objectively assess the current performance state of the project.

@wellwelwel wellwelwel changed the title fix: ensure concurrent runs for multiple inputs fix: ensure concurrency for multiple inputs Mar 19, 2025
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.95%. Comparing base (f7b4518) to head (3307eaa).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #973   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files          47       47           
  Lines        2347     2347           
  Branches        1        1           
=======================================
  Hits         2346     2346           
  Partials        1        1           
Flag Coverage Δ
linux 99.95% <100.00%> (ø)
osx 99.95% <100.00%> (ø)
windows 99.95% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wellwelwel wellwelwel marked this pull request as ready for review March 19, 2025 01:13
@wellwelwel wellwelwel merged commit 3902d1c into main Mar 19, 2025
21 checks passed
@wellwelwel wellwelwel deleted the flaky branch March 19, 2025 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sequential test suite can cause flaky tests when using same port address for multiple files
1 participant