Hello,
we started work on making it easier for people to gather data about where a snapd operation spends its time. The first part of this has just landed in git and wis now available in the the edge channel for the core snap. We added a new:
$ snap debug timings
command. With that it is now possible to see how long an each operation (task) on a change took (note that only changes installed with the latest snapd will actually record this data).
E.g.:
$ sudo snap install test-snapd-tools
$ sudo snap debug timings --last=install
ID Status Doing Undoing Summary
5999 Done 23ms - Ensure prerequisites for "test-snapd-tools" are available
6000 Done 30ms - Download snap "test-snapd-tools" (6) from channel "stable"
6001 Done 276ms - Fetch and check assertions for snap "test-snapd-tools" (6)
6002 Done 420ms - Mount snap "test-snapd-tools" (6)
6003 Done 11ms - Copy snap "test-snapd-tools" data
6004 Done 839ms - Setup snap "test-snapd-tools" (6) security profiles
6005 Done 253ms - Make snap "test-snapd-tools" (6) available to the system
6006 Done 37ms - Automatically connect eligible plugs and slots of snap "test-snapd-tools"
6007 Done 30ms - Set automatic aliases for snap "test-snapd-tools"
6008 Done 21ms - Setup snap "test-snapd-tools" aliases
6009 Done 12ms - Run install hook of "test-snapd-tools" snap if present
6010 Done 12ms - Start snap "test-snapd-tools" (6) services
6011 Done 12ms - Run configure hook of "test-snapd-tools" snap if present
More functionality and details will be added to this over the next couple of weeks.
We hope you enjoy these new capabilities.