feat(import-design): print per-stage timing breakdown on successful imports#6384
Merged
Conversation
…mports Every successful JS-lane import (write and --dry-run) now ends with one stdout line summarizing where the time went, e.g.: ✓ imported "A Channel FX" (1264 nodes) in 4.47s — decode 157ms · parse 178ms · codegen 3.93s · render 177ms Stage boundaries are steady_clock timestamps: decode spans everything that produces the parseable envelope content (the fig lane's Node subprocess, URL fetch, ZIP unpack, file read), parse ends at DesignIR, codegen at generated JS, and render covers the --validate headless render. Stages that don't run for the active mode are omitted, not shown as zero, and the line prints only when the run is about to exit successfully, so failing imports never end on the check mark. Purely additive — exit codes, artifacts, and all other output are unchanged. The StageTimings struct and formatters live in the new import_timing.hpp; the CLI hotspot only stamps the stage boundaries. Covered by a pulp-test-import-design-tool shell-out case asserting the line's fields and duration format for --validate, and the render segment's omission plus no-write for --dry-run. Hotspot-Grow: tools/import-design/pulp_import_design.cpp reason="stage-boundary timestamps must live at the pipeline's stage boundaries inside main(); the timing struct + formatters are extracted to import_timing.hpp" Skill-Update: skip skill=content reason="cli.md diff only documents import-design timing output; content-pack sections untouched" Skill-Update: skip skill=kits reason="cli.md diff only documents import-design timing output; kit sections untouched" Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014e8kbMn8Sf4mF8ozsy1Jot
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.
Every successful JS-lane import (write and --dry-run) now ends with one
stdout line summarizing where the time went, e.g.:
✓ imported "A Channel FX" (1264 nodes) in 4.47s — decode 157ms · parse 178ms · codegen 3.93s · render 177ms
Stage boundaries are steady_clock timestamps: decode spans everything
that produces the parseable envelope content (the fig lane's Node
subprocess, URL fetch, ZIP unpack, file read), parse ends at DesignIR,
codegen at generated JS, and render covers the --validate headless
render. Stages that don't run for the active mode are omitted, not
shown as zero, and the line prints only when the run is about to exit
successfully, so failing imports never end on the check mark. Purely
additive — exit codes, artifacts, and all other output are unchanged.
The StageTimings struct and formatters live in the new
import_timing.hpp; the CLI hotspot only stamps the stage boundaries.
Covered by a pulp-test-import-design-tool shell-out case asserting the
line's fields and duration format for --validate, and the render
segment's omission plus no-write for --dry-run.
Hotspot-Grow: tools/import-design/pulp_import_design.cpp reason="stage-boundary timestamps must live at the pipeline's stage boundaries inside main(); the timing struct + formatters are extracted to import_timing.hpp"
Skill-Update: skip skill=content reason="cli.md diff only documents import-design timing output; content-pack sections untouched"
Skill-Update: skip skill=kits reason="cli.md diff only documents import-design timing output; kit sections untouched"
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_014e8kbMn8Sf4mF8ozsy1Jot
Summary by cubic
Adds a one-line per-stage timing breakdown to the design import CLI, printed at the end of successful JS-lane imports (including
--dry-run). Shows total time and stage durations: decode, parse, codegen, and render (when--validaterenders).--dry-runstill prints timing but omits render; no output file is written.StageTimingsand formatters to encapsulate timing; CLI stamps stage boundaries.--validateand--dry-runcases.Written for commit 818257c. Summary will update on new commits.
🔎 Provenance
claudem5~/Code/fig-fixfd0e374f-d5dc-4e2a-bb33-6fa8b66124a0Resume
Jump to this tab
Relaunch (any agent)
Restore URL — https://claude.ai/code/session_014e8kbMn8Sf4mF8ozsy1Jot
stamped 2026-07-19 18:55 UTC