Skip to content

bench(matching): zsync prefilter, seq-match, prune workloads (#2063, #2067, #2071) - #4177

Merged
oferchen merged 1 commit into
masterfrom
bench/zsync-prefilter-and-seqmatch-2063-2071
May 16, 2026
Merged

oferchen merged 1 commit into
masterfrom
bench/zsync-prefilter-and-seqmatch-2063-2071

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

Adds three Criterion harnesses under a new internal bench-internal feature flag that exposes the minimum surface needed to measure the zsync-inspired matching insertion points without affecting release builds.

  • crates/matching/benches/bithash_rejection.rs (Ensure identical timestamp files are compared by content #2063): measures the bithash prefilter rejection rate at 1/16/128 MiB basis sizes against matching and random targets. Reports static utilization plus observed post-tag rejection rate via the new bithash_utilization, bithash_admits, and tag_admits accessors.
  • crates/matching/benches/seq_match_redundant.rs (Ensure --ignore-times forces a rewrite #2067): measures generate_delta throughput on log-file, tar-archive, and random-control corpora with a target that is basis plus a handful of small mutations, exercising the want_i adjacent-match hint path on highly redundant data.
  • crates/matching/benches/prune_duplicate_heavy.rs (Ensure copy skip heuristics verify file content #2071): measures match throughput with the matched-block pruning bitmap on and off across a zero-heavy VM-disk-style basis, a repeated-blocks synthetic corpus, and a no-duplicates regression control.

Surface impact

The new bench-internal feature exposes only:

  • DeltaSignatureIndex::bithash_utilization, bithash_admits, tag_admits (read-only accessors used by the rejection-rate harness).
  • DeltaGenerator::with_prune_matched (mirror of the existing test-only toggle, used by the prune harness).

Never enabled by default, never propagated to workspace default-features, the CLI features table, or the daemon. There is no way to turn it on from a release oc-rsync invocation. Matches the bench scaffolding contracts in docs/design/zsync-bithash.md section 7 and docs/design/zsync-prune.md.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy -p matching --all-targets --no-deps -- -D warnings
  • cargo clippy -p matching --all-targets --features bench-internal --no-deps -- -D warnings
  • cargo nextest run -p matching (318 pass, 3 skipped)
  • cargo nextest run -p matching --features bench-internal (318 pass, 3 skipped)
  • cargo check --workspace --all-features
  • cargo check -p matching --benches --features bench-internal
  • CI: full nextest matrix, Windows, macOS, Linux musl, fmt+clippy

…2067, #2071)

Adds three Criterion harnesses under a new internal `bench-internal`
feature flag that exposes the minimum surface needed to measure the
zsync-inspired matching insertion points without affecting release
builds:

- `bithash_rejection` (#2063): measures the bithash prefilter
  rejection rate at 1/16/128 MiB basis sizes, on matching and random
  targets. Reports static utilization plus observed post-tag
  rejection rate.
- `seq_match_redundant` (#2067): measures `generate_delta` throughput
  on log-file, tar-archive, and random-control corpora with a target
  that is basis plus a handful of small mutations, exercising the
  `want_i` adjacent-match hint path.
- `prune_duplicate_heavy` (#2071): measures match throughput with
  the matched-block pruning bitmap on and off across a zero-heavy
  VM-disk-style basis, a repeated-blocks synthetic corpus, and a
  no-duplicates regression control.

The new feature exposes only bench-only accessors
(`bithash_utilization`, `bithash_admits`, `tag_admits`) and the
prune toggle (`with_prune_matched`). It is never enabled by default,
never propagated to CLI/daemon, and there is no way to turn it on
from a release `oc-rsync` invocation.
@oferchen
oferchen force-pushed the bench/zsync-prefilter-and-seqmatch-2063-2071 branch from 99a98da to 4d32c0a Compare May 16, 2026 20:03
@oferchen
oferchen merged commit db081d9 into master May 16, 2026
14 checks passed
@oferchen
oferchen deleted the bench/zsync-prefilter-and-seqmatch-2063-2071 branch May 16, 2026 20:06
oferchen added a commit that referenced this pull request May 18, 2026
…2067, #2071) (#4177)

Adds three Criterion harnesses under a new internal `bench-internal`
feature flag that exposes the minimum surface needed to measure the
zsync-inspired matching insertion points without affecting release
builds:

- `bithash_rejection` (#2063): measures the bithash prefilter
  rejection rate at 1/16/128 MiB basis sizes, on matching and random
  targets. Reports static utilization plus observed post-tag
  rejection rate.
- `seq_match_redundant` (#2067): measures `generate_delta` throughput
  on log-file, tar-archive, and random-control corpora with a target
  that is basis plus a handful of small mutations, exercising the
  `want_i` adjacent-match hint path.
- `prune_duplicate_heavy` (#2071): measures match throughput with
  the matched-block pruning bitmap on and off across a zero-heavy
  VM-disk-style basis, a repeated-blocks synthetic corpus, and a
  no-duplicates regression control.

The new feature exposes only bench-only accessors
(`bithash_utilization`, `bithash_admits`, `tag_admits`) and the
prune toggle (`with_prune_matched`). It is never enabled by default,
never propagated to CLI/daemon, and there is no way to turn it on
from a release `oc-rsync` invocation.
oferchen added a commit that referenced this pull request May 18, 2026
…2067, #2071) (#4177)

Adds three Criterion harnesses under a new internal `bench-internal`
feature flag that exposes the minimum surface needed to measure the
zsync-inspired matching insertion points without affecting release
builds:

- `bithash_rejection` (#2063): measures the bithash prefilter
  rejection rate at 1/16/128 MiB basis sizes, on matching and random
  targets. Reports static utilization plus observed post-tag
  rejection rate.
- `seq_match_redundant` (#2067): measures `generate_delta` throughput
  on log-file, tar-archive, and random-control corpora with a target
  that is basis plus a handful of small mutations, exercising the
  `want_i` adjacent-match hint path.
- `prune_duplicate_heavy` (#2071): measures match throughput with
  the matched-block pruning bitmap on and off across a zero-heavy
  VM-disk-style basis, a repeated-blocks synthetic corpus, and a
  no-duplicates regression control.

The new feature exposes only bench-only accessors
(`bithash_utilization`, `bithash_admits`, `tag_admits`) and the
prune toggle (`with_prune_matched`). It is never enabled by default,
never propagated to CLI/daemon, and there is no way to turn it on
from a release `oc-rsync` invocation.
oferchen added a commit that referenced this pull request Aug 24, 2026
…2067, #2071) (#4177)

Adds three Criterion harnesses under a new internal `bench-internal`
feature flag that exposes the minimum surface needed to measure the
zsync-inspired matching insertion points without affecting release
builds:

- `bithash_rejection` (#2063): measures the bithash prefilter
  rejection rate at 1/16/128 MiB basis sizes, on matching and random
  targets. Reports static utilization plus observed post-tag
  rejection rate.
- `seq_match_redundant` (#2067): measures `generate_delta` throughput
  on log-file, tar-archive, and random-control corpora with a target
  that is basis plus a handful of small mutations, exercising the
  `want_i` adjacent-match hint path.
- `prune_duplicate_heavy` (#2071): measures match throughput with
  the matched-block pruning bitmap on and off across a zero-heavy
  VM-disk-style basis, a repeated-blocks synthetic corpus, and a
  no-duplicates regression control.

The new feature exposes only bench-only accessors
(`bithash_utilization`, `bithash_admits`, `tag_admits`) and the
prune toggle (`with_prune_matched`). It is never enabled by default,
never propagated to CLI/daemon, and there is no way to turn it on
from a release `oc-rsync` invocation.
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.

1 participant