Skip to content

feat(cli): show how long cdk deploy steps take #18230

Merged
mergify[bot] merged 8 commits intomasterfrom
cli-timing
Jan 4, 2022
Merged

feat(cli): show how long cdk deploy steps take #18230
mergify[bot] merged 8 commits intomasterfrom
cli-timing

Conversation

@kaizencc
Copy link
Copy Markdown
Contributor

Keeps track of how long cdk deploy steps take. Times synthesis time along with actual deploy time.

Result is something like this:

Screen Shot 2021-12-30 at 2 32 24 PM

No tests because all I'm adding is print statements.
Closes #18213.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@kaizencc kaizencc requested a review from skinny85 December 30, 2021 19:35
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Dec 30, 2021

@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Dec 30, 2021
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 30, 2021
Copy link
Copy Markdown
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

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

Looks great @kaizen3031593!

Two minor comments / questions.

});
}
}
print('\n✨ Total time: %ss', roundPercentage((elapsedSynthTime + elapsedDeployTime) / 1000));
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.

I notice that the synth time has a newline at the end, but neither deploy time nor total time do. Is that an intentional difference between them?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added newline to both. I like the clarity of an extra new line, and originally deploy did not have it because the following print statements began with a \n whereas the ones after synth did not. However, I see this as an opportunity to remove those extraneous new lines.

@skinny85 skinny85 added pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes labels Dec 31, 2021
@kaizencc kaizencc requested a review from skinny85 January 3, 2022 18:06
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: c8967c1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Copy Markdown
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

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

Looks great @kaizen3031593!

@mergify mergify bot merged commit 82fa742 into master Jan 4, 2022
@mergify mergify bot deleted the cli-timing branch January 4, 2022 00:12
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 4, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
Keeps track of how long `cdk deploy` steps take. Times synthesis time along with actual deploy time.

Result is something like this:

![Screen Shot 2021-12-30 at 2 32 24 PM](https://user-images.githubusercontent.com/36202692/147782736-bc68d41f-4a9a-4cc9-b623-b7a27e44c10e.png)

No tests because all I'm adding is print statements.
Closes aws#18213.
 
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. package/tools Related to AWS CDK Tools or CLI pr-linter/exempt-readme The PR linter will not require README changes pr-linter/exempt-test The PR linter will not require test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants