perf(SDK-7369): funnel POSTs off the launcher hot path; overlap exit-tail uploads (+19.7s -> +16.9s measured) - #171
Open
AakashHotchandani wants to merge 1 commit into
Open
Conversation
…oads (SDK-7369) sendStart was the first await in onPrepare (~1.8s measured) and sendFinish + the service-log upload ran sequentially in onComplete. Fire the start funnel in the background (settled in onComplete so a fast exit cannot cut it), and settle finish funnel + start funnel + log upload together. Measured on the SDK-7369 non-BStack benchmark (3 interleaved gated cycles, patched build vs stock 8.48.0): service overhead +19.65s -> +16.94s. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Two exit-path fixes for the wdio service launcher, from the SDK-7369 performance work:
sendStartoff the hot path — it was the firstawaitinonPrepare, holding launch ~1.8s (measured) for a telemetry POST whose response nothing reads. It now fires in the background; the promise is settled inonComplete, so a fast exit cannot cut it mid-flight.sendFinishand_uploadServiceLogsran sequentially inonComplete; they are independent and now settle together with the start funnel (Promise.allSettled), keeping theSDK_SEND_LOGSperf span around the upload.Measured
Non-BStack benchmark (SDK-7369), 3 interleaved gated cycles per arm, agent-free baseline, patched build vs stock 8.48.0: service overhead +19.65s → +16.94s (cycle deltas +15.8/+16.8/+18.2; arm σ ≤ 0.9s; sessions identical between arms — all service cost is head/tail). Launcher span decomposition:
sdk:pre-test5.73s (sendStart + CLI bootstrap + AI/a11y setup),sdk:cleanup3.74s.Remaining measured surface (not in this PR): binary stop drain 2.6s inside cleanup (o11y flush — binary-side streaming work, tracked on SDK-7369), ~7s of node/wdio boot overhead.
Ticket: SDK-7369 (companion PRs: browserstack-javaagent#2215, browserstack-binary#1713, browserstack-python-sdk#1202, browserstack-node-agent#2518, BStackAutomation#81849)
🤖 Generated with Claude Code