Repository navigation
test(client): add concurrent missing-service ensure benchmark - #38568
Closed
armancharan wants to merge 4 commits into
Closed
armancharan wants to merge 4 commits into
armancharan wants to merge 4 commits into
Conversation
Measure contender launches and recovery latency when N clients ensure an absent registration, and export EnsureSpawnGapMs so the harness stays tied to the real spawn gap. Co-authored-by: Cursor <[email protected]>
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Use plain test names, split setup checks from the schedule report, and keep a single recovery timer in the logged rows. Co-authored-by: Cursor <[email protected]>
armancharan
marked this pull request as ready for review
July 23, 2026 21:32
Co-authored-by: Cursor <[email protected]>
This was referenced Jul 23, 2026
Author
|
Closing this. The production change is already on |
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.
Issue for this PR
Closes #38805
#38805
Parent: #36285
(Supersedes bot-closed #38569.)
Type of change
What does this PR do?
Adds a baseline concurrent-ensure benchmark for the missing-service case.
N clients (1, 2, 4, 7) call
Service.ensureagainst an absent registration with a fake startup ofEnsureSpawnGapMs / 2(2.5s with today's 5s spawn gap).The run reports contender launches,
onStartannounces, and recovery time until all clients are healthy.No reconnect or jitter policy change — only current
Service.ensurebehavior, plus an exportedEnsureSpawnGapMsso the harness stays tied to the real spawn gap.One small test checks the setup with two clients.
A second test runs the full schedule and prints the JSON rows.
Locally, launches scale with N (1 → 1, 7 → 7) while recovery stays startup-bound (~3s).
How did you verify your code works?
Also re-ran
packages/clienttest/service.test.ts.Screenshots / recordings
N/A — not a UI layout change.
Checklist
Notes
Follow-up to the review ask on #37586: measure contender count and recovery latency for concurrent missing-service ensure before landing any reconnect-herd policy.
A later PR can keep only a change that reduces launches without delaying single-contender recovery.
Each row logs one all-healthy
recoveryMs(wall time until every client resolves).Happy to also log first-healthy if that's more useful for comparing policies later.