Skip to content

feat(cli): add --profile flag to report slowest tests#684

Merged
Chemaclass merged 1 commit into
mainfrom
feat/678-cli-profile-slowest-tests
Jun 3, 2026
Merged

feat(cli): add --profile flag to report slowest tests#684
Chemaclass merged 1 commit into
mainfrom
feat/678-cli-profile-slowest-tests

Conversation

@Chemaclass
Copy link
Copy Markdown
Member

🤔 Background

Related #678

bashunit gave no per-test timing visibility, making it hard to spot slow tests or know where to invest in speed.

💡 Changes

  • Add --profile (and BASHUNIT_PROFILE) to report the slowest tests after a run, sorted slowest-first
  • Make the count configurable via BASHUNIT_PROFILE_COUNT (default 10)
  • Aggregate timings through an append-only file so it works in both sequential and parallel mode
  • Document the option in the CLI/configuration docs, .env.example, and CHANGELOG

Records each test's wall-clock duration to a temp file when --profile
(or BASHUNIT_PROFILE=true) is set, then prints the slowest tests sorted
descending after the summary. Count is configurable via
BASHUNIT_PROFILE_COUNT (default 10). Append-only temp file aggregates
correctly across the subshells spawned by parallel runs.

Closes #678
@Chemaclass Chemaclass added the enhancement New feature or request label Jun 2, 2026
@Chemaclass Chemaclass self-assigned this Jun 2, 2026
@Chemaclass Chemaclass merged commit ca0152c into main Jun 3, 2026
30 checks passed
@Chemaclass Chemaclass deleted the feat/678-cli-profile-slowest-tests branch June 3, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant