Python profiling introduction

Python profiling introduction

Thu 03 September 2015

A short introduction to profiling with python

Time delta

Timeit

python -m timeit "a=1"

cProfiler

python -m cProfile python -m cProfile -o cprofile_result.profile

Line profiler

conda install line_profiler kernprof -l -v

Runsnakerun

pip install runsnakerun python -m cProfile -o cprofile_result.profile python runsnake.py cprofile_result.profile

VERSIONER_PYTHON_PREFER_32_BIT=yes pythonw which runsnake32 cprofile_result.profile

Tagged as : python profiling