Merged
Conversation
…ations Reorder clock fallback chain to check EPOCHREALTIME (shell variable, no subprocess) first, then date +%s%N, before spawning Perl/Python/Node. Eliminates ~188 subprocess calls per full test run on Bash 5.0+ systems.
Pass pre-computed function list from load_test_files to call_test_functions, eliminating a redundant declare -F | awk | sort | awk pipeline per test file. Saves ~100+ process spawns during test discovery.
Replace state getter subshells with direct variable reads and replace grep-based assertion counting with parameter expansion. Eliminates ~6 subshell forks per test (~5000 total for full suite).
Replace per-line file I/O with in-memory buffers that flush every 100 records. Add in-memory caches for should_track decisions and normalized paths, eliminating grep subprocesses and cd/pwd forks from the DEBUG trap hot path. Reduces I/O by ~99% when coverage is enabled.
Contributor
✅ Contributor ReportUser: @Chemaclass This user is on the trusted contributors list and was automatically approved. |
…rder The clock _choose_impl now tries EPOCHREALTIME and date before perl, so tests for perl and python must mock the earlier fallbacks to prevent them from being selected first.
JesusValeraDev
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
declare -F | awk | sort | awkpipeline per test file. Saves ~100+ process spawns during test discovery.Test plan
./bashunit tests/)make sa)make lint)