Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to do profiling a python project as a whole?

cprofile OR python-profiler are used to do profiling in python. I have done it for a single function or method. But I want to do profiling for a whole Django project. I want that on every call the result of profiling saves in a File. Is it possible?

What about runsnakerun GUI tool available for profiling? Is it helpful?

like image 731
user12345 Avatar asked Jul 25 '26 16:07

user12345


1 Answers

Check out Django Live Profiler.

I've been doing a lot of searching on this topic very recently and this is the best I've found if you want to gather information not only about the whole application but across multiple requests too. Set this up and fire some requests at your dev server with ab for example. They say it's low-overhead enough to use in production, but I haven't looked into that yet really.

For debugging single requests in a quick and dirty way, for example to see what SQL queries are being run, Django Debug Toolbar is nice; it's not exactly profiling but it's a good complement.

like image 73
Vaz Avatar answered Jul 27 '26 05:07

Vaz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!