Align --rsync-path forwarding with upstream#2199
Merged
Merged
Conversation
3 tasks
oferchen
added a commit
that referenced
this pull request
May 16, 2026
…CURSE I4) (#4120) * feat(transfer): add wire_to_flat_ndx partition_point counters (INC_RECURSE I4) Adds INC_RECURSE diagnostic counter I4 (#2199): two process-global AtomicU64 counters per side (generator and receiver) that track every wire_to_flat_ndx / flat_to_wire_ndx invocation and the cumulative partition_point comparison depth across the segment table. The counters are sampled at end-of-transfer in the existing finalize paths used by PR #4103 for the first-byte latency probe: - generator: GeneratorContext::run, just before returning GeneratorStats - receiver: finalize_transfer in receiver/transfer/phases.rs Both sides emit a debug_log!(Genr, 1, ...) line with the totals and, when the optional tracing feature is enabled, a tracing::debug! event at rsync::generator::ndx_convert / rsync::receiver::ndx_convert. A small partition_point_depth(len) helper approximates the worst-case comparison count as floor(log2(len)) + 1. Public API: a new ndx_convert_totals() free function in both modules returns (call_count, cumulative_partition_point_depth). It is the only addition to the public surface; no CLI flag, no wire-format change, no change to the existing wire_to_flat_ndx / flat_to_wire_ndx signatures. Unit tests in both crates exercise the converters and assert: - the call counter monotonically grows by at least the number of invocations made in the test (>= guards against concurrent test runs incrementing the shared counter) - the cumulative partition_point depth grows by at least N * depth(segment_table_len) after N calls against a known-size segment table Closes #2199 * chore: regenerate Cargo.lock * style: cargo fmt
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…CURSE I4) (#4120) * feat(transfer): add wire_to_flat_ndx partition_point counters (INC_RECURSE I4) Adds INC_RECURSE diagnostic counter I4 (#2199): two process-global AtomicU64 counters per side (generator and receiver) that track every wire_to_flat_ndx / flat_to_wire_ndx invocation and the cumulative partition_point comparison depth across the segment table. The counters are sampled at end-of-transfer in the existing finalize paths used by PR #4103 for the first-byte latency probe: - generator: GeneratorContext::run, just before returning GeneratorStats - receiver: finalize_transfer in receiver/transfer/phases.rs Both sides emit a debug_log!(Genr, 1, ...) line with the totals and, when the optional tracing feature is enabled, a tracing::debug! event at rsync::generator::ndx_convert / rsync::receiver::ndx_convert. A small partition_point_depth(len) helper approximates the worst-case comparison count as floor(log2(len)) + 1. Public API: a new ndx_convert_totals() free function in both modules returns (call_count, cumulative_partition_point_depth). It is the only addition to the public surface; no CLI flag, no wire-format change, no change to the existing wire_to_flat_ndx / flat_to_wire_ndx signatures. Unit tests in both crates exercise the converters and assert: - the call counter monotonically grows by at least the number of invocations made in the test (>= guards against concurrent test runs incrementing the shared counter) - the cumulative partition_point depth grows by at least N * depth(segment_table_len) after N calls against a known-size segment table Closes #2199 * chore: regenerate Cargo.lock * style: cargo fmt
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…CURSE I4) (#4120) * feat(transfer): add wire_to_flat_ndx partition_point counters (INC_RECURSE I4) Adds INC_RECURSE diagnostic counter I4 (#2199): two process-global AtomicU64 counters per side (generator and receiver) that track every wire_to_flat_ndx / flat_to_wire_ndx invocation and the cumulative partition_point comparison depth across the segment table. The counters are sampled at end-of-transfer in the existing finalize paths used by PR #4103 for the first-byte latency probe: - generator: GeneratorContext::run, just before returning GeneratorStats - receiver: finalize_transfer in receiver/transfer/phases.rs Both sides emit a debug_log!(Genr, 1, ...) line with the totals and, when the optional tracing feature is enabled, a tracing::debug! event at rsync::generator::ndx_convert / rsync::receiver::ndx_convert. A small partition_point_depth(len) helper approximates the worst-case comparison count as floor(log2(len)) + 1. Public API: a new ndx_convert_totals() free function in both modules returns (call_count, cumulative_partition_point_depth). It is the only addition to the public surface; no CLI flag, no wire-format change, no change to the existing wire_to_flat_ndx / flat_to_wire_ndx signatures. Unit tests in both crates exercise the converters and assert: - the call counter monotonically grows by at least the number of invocations made in the test (>= guards against concurrent test runs incrementing the shared counter) - the cumulative partition_point depth grows by at least N * depth(segment_table_len) after N calls against a known-size segment table Closes #2199 * chore: regenerate Cargo.lock * style: cargo fmt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
Codex Task