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

Deploying silk site-wide #56

Closed
amjd opened this issue Mar 29, 2015 · 1 comment
Closed

Deploying silk site-wide #56

amjd opened this issue Mar 29, 2015 · 1 comment

Comments

@amjd
Copy link

amjd commented Mar 29, 2015

I have two questions:

  1. Is it possible to use silk site-wide, ie without having to add a decorator before each view? If yes, how do we do it?
  2. Is it recommended to use silk in production? If any if you is already using it in production, would you care to tell me what's the performance overhead?

Thanks.

@mtford90
Copy link
Collaborator

mtford90 commented Apr 8, 2015

@amjd sorry for the late reply, never noticed this issue for some reason!

It's possible yeah - by default it will capture all views, and then you just use the decorator/context manager for profiling specific areas of code.

On production use - you can see the overhead by enabling meta profiling (see https://github.com/mtford90/silk#meta-profiling). You can also reduce the impact of this overhead by using SILKY_INTERCEPT_PERCENT and SILKY_INTERCEPT_FUNC to reduce the number of requests that are profiled. If a request suffers with a large number of database queries the overhead can be substantial, as Silk will create a model for each and every database query so that it can be inspected in the UI. I think most people who use this (including myself) just have it enabled in dev/staging instead of prod.

@mtford90 mtford90 closed this as completed Apr 8, 2015
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

2 participants