Skip to content

tools: restore descending test timing order with --time - #65603

Open
Uziniii wants to merge 1 commit into
nodejs:mainfrom
Uziniii:tools-test-time-slowest
Open

tools: restore descending test timing order with --time#65603
Uziniii wants to merge 1 commit into
nodejs:mainfrom
Uziniii:tools-test-time-slowest

Conversation

@Uziniii

@Uziniii Uziniii commented Aug 27, 2026

Copy link
Copy Markdown

The --time option displays only the first 20 entries after sorting test durations. The current ascending sort therefore reports the fastest tests.

Before 1fc4255221, CompareTime() sorted durations in descending order.
That commit replaced the comparator with an ascending key-based sort while modernizing the Python code.

Sort durations in descending order to restore the historical behavior and report the tests that contribute most to the suite's execution time.

This also matches the output documented in: #27007

The change was verified with:

$ python3 tools/test.py --mode=release --time -j1 -p dots \
    parallel/test-inspector-not-blocked-on-idle \
    parallel/test-http-methods
   1 (00:01.391) release test-inspector-not-blocked-on-idle
   2 (00:00.106) release test-http-methods

AI assistance was used to investigate the Git history and write this description as im not a native english. I reviewed and verified the change.

Signed-off-by: Uzini <43294422+Uziniii@users.noreply.github.com>
@nodejs-github-bot nodejs-github-bot added test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory. labels Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Issues and PRs related to the tests. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants