We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi !
I installed django-silk to use it for the profiler part.
It works really good using the decorators silk_profile.
silk_profile
I want to know if there is a simple solution to profile every request automatically.
When I was reading the documentation, I thought that install the middleware and SILKY_PYTHON_PROFILER=True was enough.
SILKY_PYTHON_PROFILER=True
Maybe I missed something ?
The text was updated successfully, but these errors were encountered:
You can do so by creating a middleware that will apply the decorator on all views:
from silk.profiling.profiler import silk_profile class SilkProfileAllViewsMiddleware: def __init__(self, get_response): self.get_response = get_response def __call__(self, request): response = self.get_response(request) return response def process_view(self, request, view_func, view_args, view_kwargs): return silk_profile()(view_func)(request, *view_args, **view_kwargs)
Don't forget to insert this middleware in your config file after the silk middleware
Sorry, something went wrong.
No branches or pull requests
Hi !
I installed django-silk to use it for the profiler part.
It works really good using the decorators
silk_profile
.I want to know if there is a simple solution to profile every request automatically.
When I was reading the documentation, I thought that install the middleware and
SILKY_PYTHON_PROFILER=True
was enough.Maybe I missed something ?
The text was updated successfully, but these errors were encountered: