Skip to content

tarsisazevedo/talk-performance-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Performance Analysis 101

slides: https://speakerdeck.com/tarsisazevedo/performance-analysis-101

python profiling examples.

line_profiler:

$ pip install line_profiler
$ kernprof -l web/app.py
$ python -m line_profiler web/app.py.lprof

memory_profiler:

$ pip install psutil memory_profiler
$ python -m memory_profiler web/mem.py

cProfile:

$ pip install pip install pyprof2calltree
$ python web/cprof.py # it will save a file at `profile` dir
$ pyprof2calltree -i profile/GET.root.004233ms.1464841262.prof -o profile/callgrind.GET.root.prof
$ qcachegrind profile/callgrind.GET.root.prof

perf (linux only):

$ sudo apt-get install linux-tools-common
$ perf stat python web/perf.py

About

Snippets de codigo usados na palestra ministrada na Python Nordeste 2016

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages