Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/snap: tweak the output of snap debug timings --ensure=... #6896

Merged
merged 2 commits into from May 28, 2019

Conversation

stolowski
Copy link
Contributor

Tweak the output of ensure timings per the comment from aready landed PR - #6793 (comment)

With this change the ensure timings will have an artifical line with ensure tag printed first, followed by the ensure timings "nested" under it, e.g.

$ ./snap debug timings --ensure=auto-refresh --all
ID            Status        Doing      Undoing  Summary
auto-refresh                    -            -  
 ^                          604ms            -    query store and setup auto-refresh change
481           Done            5ms            -  Ensure prerequisites for "core18" are available
482           Done         1454ms            -  Download snap "core18" (970) from channel "stable"
 ^                         1442ms            -    download snap "core18"
483           Done          305ms            -  Fetch and check assertions for snap "core18" (970)
484           Done          537ms            -  Mount snap "core18" (970)
 ^                          211ms            -    check snap "core18"
 ^                          286ms            -    setup snap "core18"
485           Done           10ms            -  Run pre-refresh hook of "core18" snap if present
486           Done           13ms            -  Stop snap "core18" services
487           Done           48ms            -  Remove aliases for snap "core18"
488           Done           24ms            -  Make current revision for snap "core18" unavailable
489           Done           92ms            -  Copy snap "core18" data
490           Done           10ms            -  Setup snap "core18" (970) security profiles
491           Done           75ms            -  Make snap "core18" (970) available to the system
 ^                           42ms            -    update font config caches
492           Done           17ms            -  Automatically connect eligible plugs and slots of snap "core18"
493           Done           12ms            -  Set automatic aliases for snap "core18"
494           Done           18ms            -  Setup snap "core18" aliases
495           Done           17ms            -  Run post-refresh hook of "core18" snap if present
496           Done            9ms            -  Start snap "core18" (970) services
497           Done           28ms            -  Remove data for snap "core18" (782)
498           Done          564ms            -  Remove snap "core18" (782) from the system
499           Done            0ms            -  Clean up "core18" (970) install
500           Done          397ms            -  Consider re-refresh of "core18"

…fical line with requested ensure tag, and nest all its timing under it, instead of just printing "ensure" as ID in the first column.
@stolowski stolowski added the Simple 😃 A small PR which can be reviewed quickly label May 23, 2019
Copy link
Collaborator

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

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

Tried it out locally. LGTM.

@bboozzoo bboozzoo merged commit d9f262f into snapcore:master May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly
Projects
None yet
3 participants