[issue31415] Add -X option to show import time

Serhiy Storchaka report at bugs.python.org
Fri Nov 3 17:41:40 EDT 2017


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Note that with environment variable you get more information.

$ ./python -X importtime -c pass
import time: self [us] | cumulative | imported package
import time:        88 |         88 |     _codecs
import time:       789 |        876 |   codecs
import time:       602 |        602 |   encodings.aliases
import time:       809 |       2287 | encodings
...

$ PYTHONPROFILEIMPORTTIME=1 ./python -c pass
import time: self [us] | cumulative | imported package
import time:      3133 |       3133 | _frozen_importlib_external
import time:       371 |        371 | zipimport
import time:       327 |        327 |     _codecs
import time:      2656 |       2982 |   codecs
import time:      1821 |       1821 |   encodings.aliases
import time:      2604 |       7406 | encodings
...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31415>
_______________________________________


More information about the Python-bugs-list mailing list