Test-More / Test-More/Test2-Harness

Busy-wait loops counter-productive on slow tests

Open
#450 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
28
Forks
30
PR merge metrics
No merged PRs in 30d

Description

I'm using Yath to drive my Selenium tests, which are extremely slow to produce test events, when compared to the regular t/*.t test file pattern. The result is that I have one core busy-spinning the wait-loop. This core could have been put to use in producing test results faster, if Yath would fall back to select() or poll() either immediately, or after initially trying to busy-wait a few cycles.

This doesn't matter so much on my local test machine (although it would silence my laptop during test runs), but does make a difference on core-constrained environments such as GitHub Actions or CircleCI. I use both with free FOSS access.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating Yath's wait loop and inspect how it handles slow Selenium test events. Compare the current busy-wait behavior with select() or poll() and verify that slow tests no longer consume a core unnecessarily while test results continue to be produced.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
performance, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.