Repository navigation
improvement(sandbox): log per-phase timing for each sandbox execution - #9587
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Low impact] The PR appears safe to merge; both previous findings are addressed and no new actionable issues were found. SummaryAdds per-phase sandbox timings to existing execution logs without adding them to response fields.
Reviews (2) · Last reviewed commit: "test(sandbox): time the unchanged-CLI wa..." · Reviewed by Greptile |
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was previously deployed
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.
Summary
run_codecall has a fixed cost of about 1 s, and today the only thing logged is the totalexecutionTime. This PR records wall time for each phase (resolve,access,leasewith itslookupandcliparts,prepare,run,collect,release) and attaches it asphaseMsto the existingE2B shell/JS/Py sandboxlog lines, together withsandboxSession(created/reused). The JS and Py lines also getexecutionTime, which the shell line already hadperformance.now()around awaits that were already therephaseMsis used only on the log line. The route destructures it and never puts it in a responsecliis the right next target in productionType of Change
Testing
session-sandbox.test.ts: a warm shell call with slowed lookup, CLI check, and run reports each delay in its own phase. Fails on the pre-change source, passes afterbun run --cwd apps/sim testonlib/execution/remote-sandbox,lib/function-execution,lib/uploads/documents,lib/workspace-files: 90 files, 1,406 tests passcheck:comment-hygiene,check:file-names,check:explicit-anypass locally. CI runs the full gateChecklist
test-auditauthoring gate)