Skip to content

benchmarks: clarify startup profile capture behavior on main#64

Open
sonukapoor wants to merge 3 commits intowasmerio:mainfrom
sonukapoor:feature/benchmark-startup-profile-verify
Open

benchmarks: clarify startup profile capture behavior on main#64
sonukapoor wants to merge 3 commits intowasmerio:mainfrom
sonukapoor:feature/benchmark-startup-profile-verify

Conversation

@sonukapoor
Copy link
Copy Markdown
Contributor

Clarify and harden benchmark startup-profile capture/reporting so the output is accurate on current main.

This PR updates:

  • benchmarks/capture-edge-startup-profile.mjs
  • benchmarks/README.md

Changes

1) Capture script behavior is now accurate and less brittle

  • Parse potential startup-profile JSON from both stdout and stderr.

  • Detect profile-like JSON more defensively instead of assuming a specific key shape only.

  • When no startup profile JSON is emitted, write a neutral, accurate reason:

    • before: binary built without EDGE_ENABLE_STARTUP_PROFILE
    • now: EDGE_STARTUP_PROFILE did not emit startup profile JSON on this checkout
  • Markdown output now states that profiling output was not detected for the run, rather than asserting a specific compile-time cause.

2) README wording updated to match real harness behavior

  • Document that the harness attempts startup profile capture by setting EDGE_STARTUP_PROFILE=1.
  • Add explicit verification command:
    • EDGE_STARTUP_PROFILE=1 ./build-edge/edge -e ""
  • Keep the rebuild attempt with -DEDGE_ENABLE_STARTUP_PROFILE=ON as a possible path, but avoid implying it is always sufficient on every checkout.

Reason

A prior issue checkpoint called out that startup-profile outputs remained unavailable even after a rebuild attempt with -DEDGE_ENABLE_STARTUP_PROFILE=ON.
This PR avoids over-claiming the cause and makes artifacts/reporting accurate for diagnosis work.

Verification

./benchmarks/run.sh empty-startup
cat benchmarks/results/empty-startup.edge-profile.json
cat benchmarks/results/empty-startup.edge-profile.md

@sonukapoor sonukapoor force-pushed the feature/benchmark-startup-profile-verify branch from b12a636 to 02cf71a Compare April 11, 2026 02:30
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