Skip to content

cksum: symlink to md5sum,b2sum, and sha*sum - #9984

Closed
oech3 wants to merge 6 commits into
uutils:mainfrom
oech3:cksum-ln
Closed

oech3 wants to merge 6 commits into
uutils:mainfrom
oech3:cksum-ln

Conversation

@oech3

@oech3 oech3 commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

Alt #9776 . but without individual bins.

@codspeed

codspeed Bot commented Jan 2, 2026 •

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #9984 will improve performance by ×8,800

Comparing oech3:cksum-ln (a4c2c4f) with main (a4f6e1a)

Summary

⚡ 14 improvements
✅ 125 untouched
⏩ 37 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Efficiency
⚡ cksum_blake2b 192,851.4 µs 208.6 µs ×920
⚡ cksum_sha2 1,727,099.3 µs 206.1 µs ×8,400
⚡ cksum_crc 16,990.8 µs 205.9 µs ×83
⚡ cksum_sha1 723,076.3 µs 206.1 µs ×3,500
⚡ cksum_md5 318,011.7 µs 206.2 µs ×1,500
⚡ cksum_sha3 1,828,114.8 µs 206.9 µs ×8,800
⚡ cksum_sha512 1,105,575.8 µs 207.2 µs ×5,300
⚡ cksum_sha256 1,727,122.1 µs 207.8 µs ×8,300
⚡ cksum_bsd 128,397.7 µs 206.2 µs ×620
⚡ cksum_sha384 1,105,538.7 µs 207.7 µs ×5,300
⚡ cksum_sha224 1,727,116.3 µs 207 µs ×8,300
⚡ cksum_crc32b 13,245.3 µs 207.2 µs ×64
⚡ cksum_sysv 48,258.8 µs 206.5 µs ×230
⚡ cksum_sm3 1,551,347.7 µs 205.8 µs ×7,500

Footnotes

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

@oech3
oech3 marked this pull request as ready for review January 2, 2026 13:36
@oech3
oech3 force-pushed the cksum-ln branch 7 times, most recently from a79d274 to a132677 Compare January 2, 2026 18:41
@oech3

oech3 commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

I considered that CodSpeed was broken, but it seems reproducible...

@oech3

oech3 commented Jan 2, 2026 •

Copy link
Copy Markdown
Contributor Author

cksum related GNU tests are passing.

@oech3

oech3 commented Jan 3, 2026

Copy link
Copy Markdown
Contributor Author

@naoNao89 Any idea about CodSpeed breakage?

@oech3

oech3 commented Jan 3, 2026

Copy link
Copy Markdown
Contributor Author

We should fix or remove #10002 before discarding hashsum.

@oech3
oech3 marked this pull request as draft January 3, 2026 11:55
@naoNao89

naoNao89 commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

The file creation happens outside the benchmark loop, so the benchmarks are measuring almost nothing.

uu/cksum/benches/cksum_bench.rs:14-24

fn $algo_name(bencher: Bencher) {
    let data = text_data::generate_by_size(100, 80);
    let file_path = setup_test_file(&data);  // File created ONCE, outside loop
    
    bencher.bench(|| {
        black_box(run_util_function(
            uumain,
            &["--algorithm", $algo_str, file_path.to_str().unwrap()],
        ));
    });  // This loop only measures reading a cached file
}

I think we should:

  • generate fresh data inside the benchmark loop, or
  • clear file system caches between iterations, or
  • benchmark the hash computation directly without file I/O

@oech3
oech3 marked this pull request as ready for review January 4, 2026 17:23
@oech3
oech3 marked this pull request as draft January 4, 2026 17:23
@oech3
oech3 force-pushed the cksum-ln branch 2 times, most recently from 4f404b2 to bc9fcbd Compare January 4, 2026 21:16
@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cksum/md5sum-bsd. tests/cksum/md5sum-bsd is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/shuf/shuf-reservoir. tests/shuf/shuf-reservoir is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/sort/sort-stale-thread-mem. tests/sort/sort-stale-thread-mem is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@oech3
oech3 marked this pull request as ready for review January 4, 2026 21:53
@oech3
oech3 force-pushed the cksum-ln branch 2 times, most recently from 0aca569 to 39d9dad Compare January 5, 2026 00:00
@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cksum/cksum-a. tests/cksum/cksum-a is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/md5sum-bsd. tests/cksum/md5sum-bsd is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tty/tty-eof. tests/tty/tty-eof is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cksum/cksum-a. tests/cksum/cksum-a is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/md5sum-bsd. tests/cksum/md5sum-bsd is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cksum/cksum-a. tests/cksum/cksum-a is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/md5sum-bsd. tests/cksum/md5sum-bsd is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cksum/md5sum-bsd. tests/cksum/md5sum-bsd is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@oech3
oech3 marked this pull request as draft January 5, 2026 02:31
@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@oech3

oech3 commented Jan 5, 2026 •

Copy link
Copy Markdown
Contributor Author

*sums are really bad legacy program :|

@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cksum/md5sum-bsd. tests/cksum/md5sum-bsd is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/shuf/shuf-reservoir. tests/shuf/shuf-reservoir is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/sort/sort-stale-thread-mem. tests/sort/sort-stale-thread-mem is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@oech3
oech3 force-pushed the cksum-ln branch 2 times, most recently from f5d29b8 to ed07374 Compare January 5, 2026 05:18
@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/cksum/b2sum. tests/cksum/b2sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/md5sum-bsd. tests/cksum/md5sum-bsd is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/md5sum-newline. tests/cksum/md5sum-newline is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha1sum. tests/cksum/sha1sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha1sum-vec. tests/cksum/sha1sum-vec is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha224sum. tests/cksum/sha224sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha256sum. tests/cksum/sha256sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha384sum. tests/cksum/sha384sum is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cksum/sha512sum. tests/cksum/sha512sum is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@oech3
oech3 force-pushed the cksum-ln branch 2 times, most recently from 044bb60 to de41913 Compare January 5, 2026 07:03
@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@oech3
oech3 force-pushed the cksum-ln branch 2 times, most recently from d5e6a80 to 944ea9a Compare January 5, 2026 07:30
@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@oech3

oech3 commented Jan 5, 2026 •

Copy link
Copy Markdown
Contributor Author

@cakebaker @RenjiSann I made a symlink plan. I think we can make individual bins after hashsum deletion.
Should fix #10002 at 1st at least, and I'd like to merge clap related PRs to reduce size of a PR at both case (1 bin or N bins).

Failing test is uptime.

@oech3
oech3 marked this pull request as ready for review January 5, 2026 08:47
@github-actions

github-actions Bot commented Jan 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@oech3 oech3 closed this Jan 6, 2026
@oech3

oech3 commented Jan 6, 2026

Copy link
Copy Markdown
Contributor Author

This looks very dangerous option if we don't have an extension --untagged on md5sum. Closing.

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.

2 participants