Profiling database queries and latency of ordinary functions in django

485 Views Asked by At

We need some tool for analyzing non view functions of our django project particularly the celery-beat tasks. So, is there any tool for profiling queries and latency of running ordinary functions (not views) in a django app? Preferably, is there any decorators (or any other mechanism) that can add results of profiling an ordinary function to the output of tools like django-silk or django-debug-toolbar?

1

There are 1 best solutions below

0
On BEST ANSWER

At last, I used the silk middleware code and made a decorator for profiling random functions like requests then used it for profiling my tasks. This was somehow patchy but worked. The code is accessible here.