Show More
The requested changes are too big and content was truncated. Show full diff
@@ -0,0 +1,16 b'' | |||||
|
1 | import cProfile as profile | |||
|
2 | import sys | |||
|
3 | #import profile | |||
|
4 | ||||
|
5 | def main(): | |||
|
6 | import IPython.ipapi | |||
|
7 | print "Entering ipython for profiling. Type 'Exit' for profiler report" | |||
|
8 | IPython.ipapi.launch_new_instance() | |||
|
9 | ||||
|
10 | if len(sys.argv) == 1: | |||
|
11 | profile.run('main()', 'ipython_profiler_results') | |||
|
12 | ||||
|
13 | import pstats | |||
|
14 | p = pstats.Stats(len(sys.argv) >1 and sys.argv[1] or 'ipython_profiler_results') | |||
|
15 | p.sort_stats('time').print_stats(30) | |||
|
16 |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
General Comments 0
You need to be logged in to leave comments.
Login now