Skip to content

feat: fix build timeline to include entire stage timings - #20805

Merged
Emyrk merged 18 commits into
mainfrom
stevenmasley/wholetimings
Nov 19, 2025
Merged

Emyrk merged 18 commits into
mainfrom
stevenmasley/wholetimings

Conversation

@Emyrk

@Emyrk Emyrk commented Nov 17, 2025 •

Copy link
Copy Markdown
Member

There is a "bug" in build timlines. The timelines are populated by discrete events. These events may not inherently include the actual total time for a given stage (plan, apply, graph, etc). Ideally we would measure the total time for a given terraform execution stage, then populate the timeline with the discrete events.

See this live example. The stages are:

  • init = 11.47s
  • plan = 864ms
  • graph = 10.06s
  • apply = 23.88s

46.27s is the total duration summed, however the timings suggest this took >1m.

Screenshot From 2025-11-13 13-32-07

Where was the ~14+ seconds taken? Without full stage timings, we are not really sure.

Fix example

This is the exact same build timings, with the stage boundary entry removed in the Before. You can see plan goes from 462ms -> 727ms and apply from 552ms -> 900ms.

Before

Screenshot From 2025-11-17 10-32-01

After

Screenshot From 2025-11-17 10-29-37 Screenshot From 2025-11-17 10-27-03

Future work

  • We should be recording more time entries for what is happening inside this missing overhead. This just captures the missing timeline in the overview.
  • UI should be reworked to look nicer.
  • The graph stage is currently not using this method. Because there is 2 graph stages, and they have to be distinct. Working on this in another PR

UI Demo

Screencast.From.2025-11-17.11-38-16.webm

@Emyrk Emyrk changed the title feat: include entire stage timings in build timeline feat: fix build timeline to include entire stage timings Nov 17, 2025
@Emyrk
Emyrk marked this pull request as ready for review November 17, 2025 17:46
@Emyrk
Emyrk force-pushed the stevenmasley/wholetimings branch from e80baae to 89cc16c Compare November 17, 2025 19:22
@Emyrk
Emyrk requested a review from dannykopping November 17, 2025 20:11
@Emyrk

Emyrk commented Nov 17, 2025

Copy link
Copy Markdown
Member Author

@dannykopping the storybook failures are happening in main.

I am watching this PR with fixes: #20808

@Emyrk
Emyrk force-pushed the stevenmasley/wholetimings branch from 73687e5 to 80631df Compare November 18, 2025 16:32

Emyrk commented Nov 18, 2025 •

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@dannykopping dannykopping left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread provisioner/terraform/timings.go Resolved
@Emyrk
Emyrk merged commit aff2080 into main Nov 19, 2025
28 of 29 checks passed
@Emyrk
Emyrk deleted the stevenmasley/wholetimings branch November 19, 2025 15:35
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants