Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profiling management commands #327

Open
FlorentPeterschmitt opened this issue Jan 10, 2019 · 4 comments
Open

Profiling management commands #327

FlorentPeterschmitt opened this issue Jan 10, 2019 · 4 comments

Comments

@FlorentPeterschmitt
Copy link

FlorentPeterschmitt commented Jan 10, 2019

Hello,

I see from Silk's code that profiling using with silk_profile(): will not work at all because of _should_profile() checking for the request object to be not None.

Is there any way to get silk to perform profiling on management commands?

Edit : diving more into the code shows me that it would require a PR for such a feature. Would that be of any interest for this project?

Many thanks

@FlorentPeterschmitt
Copy link
Author

Finally, i just came with this solution: https://gist.github.com/Leryan/ac3b9645c4a0e6f7ee6e719fcb503bf8

@gitaarik
Copy link

Hi @FlorentPeterschmitt, the gist you linked doesn't exist anymore. Do you still have it somewhere? I would be interested in it.

It's too bad that profiling isn't currently available for executions without a request.

@ZeroCoolHacker
Copy link
Member

@gitaarik Hey buddy, did you figure out the solution?

@gitaarik
Copy link

@ZeroCoolHacker No I can't remember I continued on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants