jazzband/django-silk

Profile Commands?

bruno911 opened this issue · 0 comments

I have been trying to Profile some commands that are run via manage.py.

By Commands I mean, a file like this:

https://github.com/jazzband/django-silk/blob/master/silk/management/commands/silk_clear_request_log.py

My initial error was:

"Cannot execute silk_profile as silk is not installed correctly."

So, I noticed DataCollector().request was None, inside _should_profile and so it doesn't allow to proceed.

Is there a work around? Unfortunately these Commands are long executed with multiple parameters so moving it to a view, is a lot of work for a lot of commands.

Ps. all the rest works perfectly fine, for request/response API

Thanks.