Skip to content

feat(import-design): print per-stage timing breakdown on successful imports#6384

Merged
shipyard-local[bot] merged 1 commit into
mainfrom
feat/import-timing
Jul 19, 2026
Merged

feat(import-design): print per-stage timing breakdown on successful imports#6384
shipyard-local[bot] merged 1 commit into
mainfrom
feat/import-timing

Conversation

@shipyard-local

@shipyard-local shipyard-local Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

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 --validate renders).

  • New Features
    • Prints: ✓ imported "" (N nodes) in — decode · parse · codegen · render (render appears only when applicable).
    • Stages that don’t run are omitted. Durations use ms under 1s, seconds with two decimals at or above 1s. Total is measured at print time (includes writes/reports).
    • Only prints on success; failing imports do not show the line.
    • --dry-run still prints timing but omits render; no output file is written.
    • Added StageTimings and formatters to encapsulate timing; CLI stamps stage boundaries.
    • Docs updated in CLI reference and skill guide; tests cover --validate and --dry-run cases.

Written for commit 818257c. Summary will update on new commits.

Review in cubic


🔎 Provenance

Agent claude
Machine m5
Directory ~/Code/fig-fix
Session fd0e374f-d5dc-4e2a-bb33-6fa8b66124a0

Resume

claude --resume fd0e374f-d5dc-4e2a-bb33-6fa8b66124a0

Jump to this tab

cmux surface focus B1B434D3-85F6-4937-8806-96D59886F574

Relaunch (any agent)

cmux surface resume get --surface B1B434D3-85F6-4937-8806-96D59886F574

Restore URLhttps://claude.ai/code/session_014e8kbMn8Sf4mF8ozsy1Jot

stamped 2026-07-19 18:55 UTC

…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
@shipyard-local
shipyard-local Bot merged commit 4cde069 into main Jul 19, 2026
22 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant