user12345
user12345

Reputation: 2418

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?

Upvotes: 4

Views: 538

Answers (1)

Vaz
Vaz

Reputation: 678

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.

Upvotes: 1

Related Questions