Skip to content

Add a criterion bench for the distributed cache hot path#2283

Merged
christian-schilling merged 1 commit into
masterfrom
@changes/master/christian.schilling.de@gmail.com/bench-distributed-cache
Jul 20, 2026
Merged

Add a criterion bench for the distributed cache hot path#2283
christian-schilling merged 1 commit into
masterfrom
@changes/master/christian.schilling.de@gmail.com/bench-distributed-cache

Conversation

@christian-schilling

Copy link
Copy Markdown
Member

Add a criterion bench for the distributed cache hot path

deephistory_subdir_distributed mirrors deephistory_subdir_sparse -- the same long,
sparse-output history filtered by :/dir_00 -- but the cache stack under measurement carries a
DistributedCacheBackend in addition to sled, matching the josh CLI default.

The history is linear, so almost every input commit is ineligible for the sparse persisted
cache. The distributed backend then does nothing per commit except run its eligibility check,
which makes that check the dominant per-commit cost and the signal this bench isolates. Each
timed iteration resets the sled cache and deletes refs/josh/cache/* so the distributed cache
starts cold.

Change: bench-distributed-cache
Assisted-By: Claude Fable 5 (claude-fable-5)

@christian-schilling
christian-schilling force-pushed the @base/master/christian.schilling.de@gmail.com/bench-distributed-cache branch from cd4a254 to 6dbb77b Compare July 20, 2026 07:57
@christian-schilling
christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/bench-distributed-cache branch from 529584d to 10548a2 Compare July 20, 2026 07:57
@christian-schilling
christian-schilling force-pushed the @base/master/christian.schilling.de@gmail.com/bench-distributed-cache branch from 6dbb77b to dd692e2 Compare July 20, 2026 08:29
@christian-schilling
christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/bench-distributed-cache branch from 10548a2 to 9b71d13 Compare July 20, 2026 08:29
@christian-schilling
christian-schilling changed the base branch from @base/master/christian.schilling.de@gmail.com/bench-distributed-cache to master July 20, 2026 08:29
@christian-schilling
christian-schilling marked this pull request as ready for review July 20, 2026 08:29
@codspeed-hq

codspeed-hq Bot commented Jul 20, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 16 untouched benchmarks
🆕 3 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 deephistory_subdir_distributed[100] N/A 11.8 ms N/A
🆕 deephistory_subdir_distributed[1000] N/A 107.5 ms N/A
🆕 deephistory_subdir_distributed[10000] N/A 1.1 s N/A

Comparing @changes/master/christian.schilling.de@gmail.com/bench-distributed-cache (9b71d13) with master (d7649b7)1

Open in CodSpeed

Footnotes

  1. No successful run was found on master (dd692e2) during the generation of this report, so d7649b7 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@christian-schilling
christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/bench-distributed-cache branch from 9b71d13 to 2c7e42e Compare July 20, 2026 10:24
deephistory_subdir_distributed mirrors deephistory_subdir_sparse -- the same long,
sparse-output history filtered by :/dir_00 -- but the cache stack under measurement carries a
DistributedCacheBackend in addition to sled, matching the josh CLI default.

The history is linear, so almost every input commit is ineligible for the sparse persisted
cache. The distributed backend then does nothing per commit except run its eligibility check,
which makes that check the dominant per-commit cost and the signal this bench isolates. Each
timed iteration resets the sled cache and deletes refs/josh/cache/* so the distributed cache
starts cold.

Change: bench-distributed-cache
Assisted-By: Claude Fable 5 (claude-fable-5)
@christian-schilling
christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/bench-distributed-cache branch from 2c7e42e to 351e769 Compare July 20, 2026 11:11
@christian-schilling
christian-schilling added this pull request to the merge queue Jul 20, 2026
Merged via the queue into master with commit 4f46cdc Jul 20, 2026
3 checks passed
@christian-schilling
christian-schilling deleted the @changes/master/christian.schilling.de@gmail.com/bench-distributed-cache branch July 20, 2026 11:25
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