Skip to content

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
mainfrom
perf/SDK-7369-funnel-off-hot-path
Open

perf(SDK-7369): funnel POSTs off the launcher hot path; overlap exit-tail uploads (+19.7s -> +16.9s measured)#171
AakashHotchandani wants to merge 1 commit into
mainfrom
perf/SDK-7369-funnel-off-hot-path

Conversation

@AakashHotchandani

Copy link
Copy Markdown
Collaborator

What

Two exit-path fixes for the wdio service launcher, from the SDK-7369 performance work:

  1. sendStart off the hot path — it was the first await in onPrepare, holding launch ~1.8s (measured) for a telemetry POST whose response nothing reads. It now fires in the background; the promise is settled in onComplete, so a fast exit cannot cut it mid-flight.
  2. Exit tail overlappedsendFinish and _uploadServiceLogs ran sequentially in onComplete; they are independent and now settle together with the start funnel (Promise.allSettled), keeping the SDK_SEND_LOGS perf 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-test 5.73s (sendStart + CLI bootstrap + AI/a11y setup), sdk:cleanup 3.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

…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>
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.

1 participant