speedTools.bash
10 lines
| 358 B
| text/x-sh
|
BashLexer
/ schainpy / speedTools.bash
|
r795 | #Use this script in order to find the slowest module or function in your python code. | |
#Reference: http://lukauskas.co.uk/articles/2014/02/12/how-to-make-python-faster-without-trying-that-much/ | |||
|
r327 | #!/bin/sh | |
|
r795 | script = "testRawData.py" | |
output = "profile.pdf" | |||
|
r327 | ||
|
r795 | python -m cProfile -o profile.pstats $script | |
|
r327 | ||
|
r795 | gprof2dot -f pstats profile.pstats | dot -Tpdf -o $output |