test: add durable, batched and roll publish benchmarks #3
No reviewers
Labels
No labels
code-review
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
norobo/webstream!3
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/publish-benchmarks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finishes Phase 5 of the server-persistence plan.
WithFlushIntervalshipped inmain(PR #1), but the benchmarks that were supposed to decide its default cadence did not.Why this is a new PR rather than a reopen of #1
PR #1 is merged (
74c236d) and cannot be reopened. The benchmarks lived on the orphan commitdc1a72a("bench: add durable vs batched publish and roll benchmarks (phase 5)"), which branched from3064914— before the PR #1 review fixes — and was never merged:Merging that commit wholesale would have reverted the review fixes. Relative to
main, its per-file diff is:bench_test.goprotocol.goserver.goserver_test.gostore.gostore_test.goSo this branch takes only
bench_test.go, on top ofmain, exactly 105 added lines. The review fix (3064914→main) never touchedbench_test.go, so the addition applies cleanly with no conflict. The orphan commit is preserved locally atdc1a72aand is left untouched.What it measures
The default is still per-publish fsync (
flushIntervalzero). linux/arm64, 500 iterations x3:A batched cadence is roughly 55x faster per publish, and a roll costs about one fsync — the crash window a non-zero interval trades away. The benchmarks are left alongside the count-only ones already in
bench_test.go(BenchmarkServerPublish,BenchmarkServerPull,BenchmarkServerPublishDedup,BenchmarkBudgetSweepNonResident, ...).Verification
This does not change behavior
Test-only: no production file is touched, and the fsync default is deliberately left as-is. Choosing a non-zero default from these numbers is a separate decision for you.