Тёмный

pretty python profiling (intermediate) anthony explains  

anthonywritescode
Подписаться 39 тыс.
Просмотров 8 тыс.
50% 1

today I show how I figure out what's slow in a python application and some cool visualization tools!
- cProfile / pstats: docs.python.org/3/library/pro...
- importtime-waterfall: github.com/asottile/importtim...
- yelp-gprof2dot: github.com/Yelp/gprof2dot
- graphviz: www.graphviz.org/
- pre-commit: pre-commit.com
playlist: • anthony explains
==========
twitch: / anthonywritescode
dicsord: / discord
twitter: / codewithanthony
github: github.com/asottile
stream github: github.com/anthonywritescode
I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!

Наука

Опубликовано:

 

2 май 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@BabakKeyvani0
@BabakKeyvani0 6 месяцев назад
Wow! This video was chock-full of all kinds of amazing info and tools 🤩🙌🏼 Loved the part about .har files and the yelp-gprof2dot, as well as your quick explanation of how to strip the formatting/style info and just understand the general form of the dot files (for the graph). 🙌🏼 Thank you
@GabrieleBonetti
@GabrieleBonetti 4 года назад
Awesome stuff. I imagine this is also what the pycharm integrated profiler is based on, they look really similar. Learning a lot by the way. cheers mate
@JtotheAKOB
@JtotheAKOB Год назад
very straight forward and very clear and calm voice. thank you very much :)
@guntbert9709
@guntbert9709 4 года назад
I really cherish your short pieces around python.
@jimigrok
@jimigrok 4 года назад
very helpful - thanks
@horseinthesky
@horseinthesky 3 года назад
Thanks. I think it will help me a lot. I'm trying to repeat the steps you did in the video but it fails on calling dot. There is no "dot" in my $PATH. I've installed graphviz to my venv but still no dot =(
@anthonywritescode
@anthonywritescode 3 года назад
the pypi `graphviz` project is not associated with the actual graphviz project -- dot comes from the core graphviz project (for example from apt-get install graphviz): $ dpkg -S $(which dot) graphviz: /usr/bin/dot
@horseinthesky
@horseinthesky 3 года назад
@@anthonywritescode Thanks again. Works great =)
@GertBurger
@GertBurger 4 года назад
Have you tried snakeviz?
@anthonywritescode
@anthonywritescode 4 года назад
yeah I have, it has a lot of viz modes but I find they're harder to drill into :shrugs:
@TarunSharma-ml3ih
@TarunSharma-ml3ih 2 года назад
hey , i executed this command in my rhel 7 : "gprof log.pstats | babi -" and I am getting this error,please help me with this : "gprof: log.pstats: not in executable format babi: Command not found."
@anthonywritescode
@anthonywritescode 2 года назад
I didn't use `gprof` -- I used `gprof2dot`. also if you don't have `babi` installed you won't be able to run `babi` of course!
@con-f-use
@con-f-use Год назад
To do a bit of grave-digging: Are you still using gprof2dot and dot or what would you recommend today? I've been using evanhempel's python-flamegraph a bit, but not really settled on any performance vis tool for python yet. SnakeViz sounds promising too or KCacheGrind (with pyprof2calltree).
@anthonywritescode
@anthonywritescode Год назад
I still use this same toolset yes
Далее