Skip to content

(CLI): show the time it takes for cdk deploy (including when running cdk watch) to finish #18213

Closed
@skinny85

Description

@skinny85
Contributor

Description

Let's print out the total time it takes for cdk deploy to finish, including when a deployment happens through cdk watch.

This will allows us to brag more easily about how quickly hotswapping works 😃.

Use Case

Showing the speedup hotswap deployments offer.

Proposed Solution

Print out the time it takes for deployment to finish in the CDK CLI.

Other information

Print out the total time

Acknowledge

  • I may be able to implement this feature request
    This feature might incur a breaking change

Activity

added
feature-requestA feature should be added or improved.
needs-triageThis issue or PR still needs to be triaged.
on Dec 29, 2021
kaizencc

kaizencc commented on Dec 29, 2021

@kaizencc
Contributor

I actually feel like this is reinventing the wheel a little bit, specifically for cdk deploy. We can easily call yarn cdk deploy or time cdk deploy to get the same functionality. The only time where we can't do this is for cdk watch, since it's not one-shot.

I thought we might just do this for cdk watch only and add a time stamp wrapper around this:

await this.invokeDeployFromWatch(options);

Happy to do it for cdk deploy if you feel otherwise but I feel like the use case is only for cdk watch.

added
effort/smallSmall work item – less than a day of effort
and removed
needs-triageThis issue or PR still needs to be triaged.
on Dec 29, 2021
skinny85

skinny85 commented on Dec 29, 2021

@skinny85
ContributorAuthor

I agree it's not great if we simply write out the total time. So why don't we spice things up a little bit? 😃

What if we divided the different phases of deploy, and printed out the time for each of them? For example, the time to synth the Cloud Assembly immediately jumps out to me as being interesting.

So, the output would be something like:

$ cdk deploy MyExampleStack
Stack MyExampleStack
...

✨  Synthesis time: 3.54s
...

✨  Deployment time: 4.56s
...

✨  Total time: 8.1s
...

Thoughts on this idea?

misterjoshua

misterjoshua commented on Dec 29, 2021

@misterjoshua
Contributor

In this vein: I'd appreciate a performance tracing mode for synthesis because I find it difficult to tell which parts of my cdk app (probably bundling assets, but which?) are slowing my synth down.

added a commit that references this issue on Jan 4, 2022
82fa742
github-actions

github-actions commented on Jan 4, 2022

@github-actions
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

added a commit that references this issue on Feb 21, 2022
17c0c52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

effort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @skinny85@rix0rrr@misterjoshua@kaizencc

    Issue actions

      (CLI): show the time it takes for `cdk deploy` (including when running `cdk watch`) to finish · Issue #18213 · aws/aws-cdk