A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/kmichel/python-importtime-graph below:

kmichel/python-importtime-graph: Display a treemap of the timings reported by python -X importtime

Display a treemap of the timings reported by python -X importtime

Try it: https://kmichel.github.io/python-importtime-graph/

Run your python program with the -X importtime option, available since Python 3.7.

The program will output timing statistics on stderr :

import time: self [us] | cumulative | imported package
import time:       137 |        137 | zipimport
import time:       674 |        674 | _frozen_importlib_external
import time:        84 |         84 |     _codecs
import time:       705 |        789 |   codecs
import time:       757 |        757 |   encodings.aliases
import time:      1115 |       2659 | encodings
import time:       461 |        461 | encodings.utf_8
import time:       190 |        190 | _signal
import time:       488 |        488 | encodings.latin_1
import time:        72 |         72 |     _abc
import time:       456 |        528 |   abc
import time:       574 |       1101 | io
import time:       102 |        102 |   _locale
import time:       319 |        420 | _bootlocale

Copy these stats and then paste them using the button in the web page above.

You can also save the stats to a file and open the file in the web page.

python -X importtime [YOUR_PROGRAM] 2> importtime.txt

Once rendered, you can download the output in SVG or PNG format.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4