Skip to content

gnu responsive test (1/2) - #16088

Draft
anastygnome wants to merge 26 commits into
uutils:mainfrom
anastygnome:responsive
Draft

anastygnome wants to merge 26 commits into
uutils:mainfrom
anastygnome:responsive

Conversation

@anastygnome

@anastygnome anastygnome commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Currently, most tools buffer their output using rust's bufWriter. While this is fine, this is an issue: libc buffering uses an envvar _STDBUF_O to tune the buffering, but rust does not. This made the test fail and could impact scripts.

Therefore, I added a specific buffering mechanism that checks for this and chooses the right kind of buffer according to the envvar.

pr, and uniq also had another issue : they'd wait for an EOF to come, which is bad. this was moved to another PR

I did one commit per tool for traceability.

Copilot AI balanced review requested due to automatic review settings October 31, 2026 20:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

Copilot AI balanced review requested due to automatic review settings October 31, 2026 20:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@codspeed

codspeed Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 5.76%

1 warning

⚠️ 86 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 4 improved benchmarks
❌ 25 regressed benchmarks
✅ 126 untouched benchmarks
🆕 2 new benchmarks
⏩ 316 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ shuf_repeat_sampling[(50000, 10)] 5.4 ms 6.9 ms -21.65%
❌ shuf_input_range[1000000] 151.5 ms 190.8 ms -20.6%
❌ seq_integers 48.2 ms 58 ms -17%
❌ seq_with_step 24.4 ms 29.2 ms -16.48%
❌ seq_custom_separator 51.6 ms 61.4 ms -16.04%
❌ shuf_repeat_sampling[(50000, 80)] 9.3 ms 10.7 ms -13.82%
❌ join_full_match 21.7 ms 24.9 ms -12.85%
❌ join_french_locale 21.7 ms 24.9 ms -12.82%
❌ join_custom_separator 22.1 ms 25.1 ms -11.99%
❌ unexpand_large_file[10] 89.5 ms 98.4 ms -9.01%
❌ unexpand_many_lines[100000] 43.1 ms 47.3 ms -8.93%
❌ nl_large_file[10] 43.9 ms 47.8 ms -8.12%
❌ nl_many_lines[100000] 34.6 ms 37.4 ms -7.57%
❌ join_unicode_locale 2.2 ms 2.3 ms -7.03%
❌ tsort_tree_dag[(10, 3)] 36.9 ms 39.4 ms -6.38%
❌ tsort_wide_dag[100000] 152.8 ms 161.3 ms -5.29%
❌ tsort_complex_dag[50000] 86 ms 90.4 ms -4.83%
❌ factor_multiple_u64s[2] 56.9 ms 59.7 ms -4.74%
❌ seq_formatted 141.4 ms 148.2 ms -4.57%
❌ tsort_linear_chain[1000000] 1.9 s 1.9 s -4.41%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing anastygnome:responsive (703eb12) with main (fabdca4)

Open in CodSpeed

Footnotes

  1. 316 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. ↩

@anastygnome
anastygnome marked this pull request as draft October 31, 2026 21:00
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/misc/responsive is no longer failing!

@anastygnome
anastygnome force-pushed the responsive branch 2 times, most recently from 95c6f3d to c3839ea Compare October 31, 2026 21:20
@anastygnome
anastygnome deleted the responsive branch October 31, 2026 22:16
@sylvestre

Copy link
Copy Markdown
Contributor

why did you close it ? too hard?

@oech3

oech3 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

@anastygnome Do you know uucore::io::Raw{Reader,Writer}? They are not buffered by default (but unix only i.e. it cannot be ported for Windows). If you closed this because of performance drop, you can try wrapping them by Buf{Reader, Writer}.

@anastygnome

Copy link
Copy Markdown
Contributor Author

@sylvestre I inadvertently removed the branch so that pr closed.

@oech3 I'll try later

@anastygnome
anastygnome restored the responsive branch November 1, 2026 06:47
@anastygnome anastygnome reopened this Nov 1, 2026
Comment thread src/uucore/src/lib/mods/output.rs Resolved
@anastygnome
anastygnome force-pushed the responsive branch 2 times, most recently from 8d12bf4 to f3ec360 Compare November 1, 2026 09:34
@oech3

oech3 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Related issue: #11581

Note that CodSpeed ignores time of syscalls. Then benchmark should be done by ourself.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Binary size comparison:

Individual binary size comparison VS main (threshold: >=5% AND >=4 KB).

Total size of compared binaries: 155.50 MB (+264 KB, +0.17%)

Significant per-binary changes:
  cut     1.19 MB ->    1.30 MB  (+116 KB, +9.51%)

@anastygnome
anastygnome force-pushed the responsive branch 5 times, most recently from 8aace7b to fdf13bd Compare November 1, 2026 10:08
@oech3

oech3 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

wasi does not suppprt stdbuf.wasm and Windows's stdbuf.exe is depending on Cygwin's libstdbuf.dll and supports executables linked against Cygwin RT only. How about extending stdbuf to the trivial _STDBUF_* wrapper at the different PR ?

@oech3

oech3 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor


#[cfg(unix)]
fn requested_mode() -> BufferMode {
let Some(value) = std::env::var_os("_STDBUF_O") else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GNU stdbuf does not change buffering if LD_PRELOAD was unset at somewhere of chain of child processes. This is somewhat bug-compatibility, but we should consider if it is a good extension, or find libstdbuf.so in LD_PRELOAD variable too.

@xtqqczze

Copy link
Copy Markdown
Collaborator

needs to be rebased for codspeed

@anastygnome

Copy link
Copy Markdown
Contributor Author

oh dear!

@xtqqczze

Copy link
Copy Markdown
Collaborator

If this intended to close an issue, please say so in the PR description.

@xtqqczze

Copy link
Copy Markdown
Collaborator

This branch has conflicts that must be resolved

@anastygnome

Copy link
Copy Markdown
Contributor Author

@xtqqczze this is a draft for a reason :)

This branch has not been deployed

No deployments
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.

5 participants