Skip to content

benchmarks: prepare args outside benchmark#10388

Open
xtqqczze wants to merge 1 commit intouutils:mainfrom
xtqqczze:get_benchmark_args
Open

benchmarks: prepare args outside benchmark#10388
xtqqczze wants to merge 1 commit intouutils:mainfrom
xtqqczze:get_benchmark_args

Conversation

@xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Jan 20, 2026

Currently, we construct uucore::Args within the measured section of benchmarks. That adds allocation and conversion overhead and will skew the results.

Not all benchmarks are converted yet, but perhaps we can take this as a first step.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/tail/retry. tests/tail/retry is passing on 'main'. Maybe you have to rebase?

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 20, 2026

Merging this PR will improve performance by ×31

⚡ 7 improved benchmarks
✅ 291 untouched benchmarks
⏩ 48 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory du_deep_tree[(100, 3)] 3,209.6 KB 104.5 KB ×31
Simulation unexpand_large_file[10] 302.2 ms 270.8 ms +11.63%
Simulation unexpand_many_lines[100000] 144.3 ms 129.2 ms +11.62%
Simulation cp_large_file[16] 278.2 µs 260.5 µs +6.77%
Simulation du_wide_tree[(5000, 500)] 9.1 ms 8 ms +14.05%
Simulation du_all_wide_tree[(5000, 500)] 16.2 ms 15.1 ms +7.62%
Simulation du_deep_tree[(100, 3)] 1,098.1 µs 950.3 µs +15.55%

Comparing xtqqczze:get_benchmark_args (a2788c0) with main (995c9e0)

Open in CodSpeed

Footnotes

  1. 48 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@xtqqczze
Copy link
Contributor Author

@sylvestre Please could you confirm whether these changes are viable to apply in full?

@sylvestre
Copy link
Contributor

i guess ? :)

@xtqqczze
Copy link
Contributor Author

Need to refactor to handle the following case:

bencher.bench(|| {
fs_utils::remove_path(&dest);
let mut full_args = Vec::with_capacity(args.len() + 2);
full_args.extend_from_slice(args);
full_args.push(source_str);
full_args.push(dest_str);

@oech3
Copy link
Contributor

oech3 commented Jan 26, 2026

Should we wait working about #10486 until your PR was merged?
Any chance for splitting PR?

xtqqczze added a commit to xtqqczze/uutils-coreutils that referenced this pull request Jan 26, 2026
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/pr/bounded-memory. tests/pr/bounded-memory is passing on 'main'. Maybe you have to rebase?

@oech3
Copy link
Contributor

oech3 commented Feb 13, 2026

is this able to merge?

@xtqqczze
Copy link
Contributor Author

is this able to merge?

I couldn't work out how to handle all the cases, such as #10388 (comment)

@oech3
Copy link
Contributor

oech3 commented Feb 15, 2026

How about splitting this PR?

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)
Note: The gnu test tests/rm/many-dir-entries-vs-OOM is now being skipped but was previously passing.
Congrats! The gnu test tests/cp/link-heap is now passing!
Congrats! The gnu test tests/cut/cut-huge-range is now passing!
Note: The gnu test tests/env/env-signal-handler was skipped on 'main' but is now failing.

@xtqqczze

This comment was marked as outdated.

@oech3
Copy link
Contributor

oech3 commented Mar 5, 2026

Any progress about this?

@xtqqczze xtqqczze force-pushed the get_benchmark_args branch from b2aedf9 to ae7ca7b Compare March 5, 2026 21:23
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)

@xtqqczze xtqqczze force-pushed the get_benchmark_args branch from ae7ca7b to 8b71b7f Compare March 5, 2026 22:06
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)

@xtqqczze xtqqczze force-pushed the get_benchmark_args branch from 8b71b7f to 2ba6b6a Compare March 5, 2026 23:25
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/csplit/csplit-heap is now being skipped but was previously passing.

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/follow-name (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/printf/printf-surprise is now being skipped but was previously passing.
Congrats! The gnu test tests/rm/many-dir-entries-vs-OOM is now passing!
Congrats! The gnu test tests/tail/pipe-f is now passing!

@xtqqczze xtqqczze force-pushed the get_benchmark_args branch from 1dedff9 to a2788c0 Compare March 8, 2026 13:03
@xtqqczze
Copy link
Contributor Author

xtqqczze commented Mar 8, 2026

Any progress about this?

Finally, I have clean benchmark results

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

GNU testsuite comparison:

GNU test failed: tests/tail/pid-pipe. tests/tail/pid-pipe is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/basenc/bounded-memory is now being skipped but was previously passing.
Note: The gnu test tests/tail/tail-n0f is now being skipped but was previously passing.
Congrats! The gnu test tests/rm/many-dir-entries-vs-OOM is now passing!
Congrats! The gnu test tests/tail/pipe-f is now passing!

@xtqqczze xtqqczze marked this pull request as ready for review March 8, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants