Skip to content

Print elapsed time for image unpack#5114

Merged
estesp merged 1 commit intocontainerd:masterfrom
alakesh:print-unpack-time
Mar 10, 2021
Merged

Print elapsed time for image unpack#5114
estesp merged 1 commit intocontainerd:masterfrom
alakesh:print-unpack-time

Conversation

@alakesh
Copy link
Copy Markdown
Contributor

@alakesh alakesh commented Mar 2, 2021

This provides additional insight into how much time is being spent in
unpacking and is helpful in performance comparison for just this stage
without resorting to running under time command in linux for example.

Signed-off-by: Alakesh Haloi [email protected]

@k8s-ci-robot
Copy link
Copy Markdown

Hi @alakesh. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 2, 2021

Build succeeded.

Comment thread cmd/ctr/commands/images/pull.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How do you feel about:

Suggested change
fmt.Printf("done: %-4.1fs\t\n", time.Since(start).Seconds())
fmt.Printf("done: %s\t\n", time.Since(start))

So it'll choose proper formatting depending on elapsed time:

done: 10s	
done: 1m40s	
done: 2h46m40s

https://play.golang.org/p/jFRYNWE7UDE

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.

Thanks for the suggestion. It definitely looks better even though just using seconds makes it more script friendly. Updated the PR.

@alakesh alakesh force-pushed the print-unpack-time branch from a0b2ace to b4f9565 Compare March 9, 2021 01:22
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 9, 2021

Build succeeded.

@alakesh alakesh force-pushed the print-unpack-time branch from b4f9565 to 513a9cf Compare March 9, 2021 01:32
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 9, 2021

Build succeeded.

Comment thread cmd/ctr/commands/images/pull.go Outdated
@alakesh alakesh force-pushed the print-unpack-time branch from 513a9cf to 3c60a41 Compare March 9, 2021 06:05
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 9, 2021

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

The provides additional insight into how much time is being spent in
unpacking and is helpful in performance comparison for just this stage
without resorting to running under time command in linux for example.

Signed-off-by: Alakesh Haloi <[email protected]>
@alakesh alakesh force-pushed the print-unpack-time branch from 3c60a41 to 9f5244f Compare March 9, 2021 06:41
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Mar 9, 2021

Build succeeded.

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit 17ab5dd into containerd:master Mar 10, 2021
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.

5 participants