Add ability to run statprof as a module #16

Closed
wants to merge 3 commits into
from

Projects

None yet

3 participants

@nvie
nvie commented Sep 4, 2013

This supports the following usage pattern, similar to other profiling tools, or pdb:

$ python -m statprof myscript.py
<output of myscript here>
 time    seconds   seconds  name
 93.67      0.20      0.20  myscript.py:8:main
  2.53      0.01      0.01  myscript.py:7:main
  1.90      0.00      0.00  myscript.py:9:main
  1.27      0.00      0.00  myscript.py:6:main
  0.63      0.00      0.00  myscript.py:10:main
  0.00      0.21      0.00  runpy.py:162:_run_module_as_main
  0.00      0.21      0.00  myscript.py:18:<module>
  0.00      0.21      0.00  statprof.py:471:<module>
  0.00      0.21      0.00  runpy.py:72:_run_code
  0.00      0.21      0.00  statprof.py:468:main

---
Sample count: 158
Total time: 0.210000 seconds
@zyv
zyv commented Jan 23, 2014

Can be closed if #17 is merged.

@durin42
Collaborator
durin42 commented Oct 9, 2015

Open to this, but it seems to have bitrotted. Closing for now.

@durin42 durin42 closed this Oct 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment