Пример #1
0
a=1
a
get_ipython().run_line_magic('logoff', '')
get_ipython().run_line_magic('logstop', '')
get_ipython().run_line_magic('logstop', '')
get_ipython().run_line_magic('run', '-m cProfile -o cprofile.out -s cumulative 03_ml_data.py')
get_ipython().run_line_magic('run', '-m cProfile -h')
from pstats import Stats
s=Stats(cprofile.out)
s=Stats('cprofile.out')
s
print_stats(s)
import pstats
s.print_stats()
s.print_caller()
s.prim_calls()
s.print_callees()
s.print_call_line()
s.strip_dirs()
s=s.strip_dirs()
s.sort_stats
s.sort_stats()
s=s.sort_stats('cumulative')
s.print_callers()
get_ipython().run_line_magic('logstart', '')
s.print_callers()
get_ipython().run_line_magic('run', '-m cProfile -s cumulative 03_ml_data.py >cprofile.out 2>&1')
get_ipython().run_line_magic('run', '-m cProfile -s cumulative 03_ml_data.py 2>cprofile.out')
get_ipython().run_line_magic('capture', 'cprofile.out')
get_ipython().run_cell_magic('capture', 'cprofile.out', 'run -m cProfile -s cumulative 03_ml_data.py')
run -m cProfile -s cumulative 03_ml_data.py