Output build times for each pip package built
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### What needs to get done
During/after packing, please output the time it took to build each package.
### Why it needs to get done
Since charmcraft packs with `--no-binary`, build times can be very long.
It would be very useful for charm authors to know which parts of their deps contribute to build time.
For example, we had no idea that it's `pydantic_core` that is the lengthy one and not `pydantic` itself.
Such knowledge could help us in deciding if we want to keep a dep or drop it.
For example, httpx takes a long time to build, so one might prefer using urllib instead.
This could be either in a tree format similar to pipdeptree, or a flat list like strace. Either works :)
```
$ pipdeptree
cosl==0.0.23
├── ops [required: Any, installed: 2.15.0]
│ ├── PyYAML [required: ==6.*, installed: 6.0.2]
│ └── websocket-client [required: ==1.*, installed: 1.8.0]
├── pydantic [required: Any, installed: 2.8.2]
│ ├── annotated-types [required: >=0.4.0, installed: 0.7.0]
│ ├── pydantic_core [required: ==2.20.1, installed: 2.20.1]
│ │ └── typing_extensions [required: >=4.6.0,!=4.7.0, installed: 4.12.2]
│ └── typing_extensions [required: >=4.6.1, installed: 4.12.2]
├── PyYAML [required: Any, installed: 6.0.2]
├── tenacity [required: Any, installed: 9.0.0]
└── typing_extensions [required: Any, installed: 4.12.2]
```
```
$ strace -wc sleep 3
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
99.93 3.000132 3000132 1 clock_nanosleep
0.02 0.000542 18 30 12 openat
0.01 0.000425 19 22 mmap
0.01 0.000321 16 20 close
0.01 0.000272 15 18 fstat
0.01 0.000241 240 1 execve
0.00 0.000054 17 3 mprotect
0.00 0.000042 13 3 brk
0.00 0.000041 13 3 read
0.00 0.000022 11 2 pread64
0.00 0.000021 20 1 munmap
0.00 0.000015 15 1 futex
0.00 0.000015 14 1 prlimit64
0.00 0.000015 14 1 arch_prctl
0.00 0.000014 14 1 getrandom
0.00 0.000014 14 1 set_tid_address
0.00 0.000014 14 1 rseq
0.00 0.000014 13 1 set_robust_list
0.00 0.000012 12 1 1 access
------ ----------- ----------- --------- --------- ----------------
100.00 3.002227 26805 112 13 total
```
Evaluation history
No evaluation history available.