TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Silk, a profiling tool for Django

113 pointsby mtfordalmost 11 years ago

11 comments

severbalmost 11 years ago
Probably not a good idea to keep your profiler open to the world as long as you allow reading from arbitrary files. After a bit of fiddling around I was able to read your secret key from the settings file. It starts with 'es!b3'. And your soundcloud password. Sorry.
评论 #7861633 未加载
Kaedonalmost 11 years ago
Very cool, this seems much nicer than using hotshot to profile Django.<p>I&#x27;m a little confused by this page though: <a href="http://mtford.co.uk/silk/request/1907/profiling/" rel="nofollow">http:&#x2F;&#x2F;mtford.co.uk&#x2F;silk&#x2F;request&#x2F;1907&#x2F;profiling&#x2F;</a>. Why is wrapped_target listed so many times for a single blog post query? Is there a hierarchy to the profile calls that&#x27;s not shown? Oh, does it go deepest level to highest level calls?
评论 #7859219 未加载
numlockedalmost 11 years ago
Looks very interesting! We currently use django debug toolbar for profiling, which seems to have a lot of overlap. I like how Silk stores the profiles of multiple requests - that seems to be a nice differentiator. What else? Thanks for the awesome contribution to the Django community!
评论 #7859826 未加载
评论 #7861592 未加载
iamwithnailalmost 11 years ago
This is a really great tool, massive fan, made some good use of it in the ~15 hours since I installed it yesterday evening. Are you aware it seems to bork the admin interface?<p>If, after installing Silk, I use admin to update a record, I get &quot;You cannot access body after reading from request&#x27;s data stream&quot; - this applies across all admin models and pages. It&#x27;s not really that big a deal, as I rarely use the admin pages now, but it might have knock-on effects that I haven&#x27;t seen yet. (Commenting out Silk in the installed apps list clears the problem up straight away.)<p>I&#x27;ll ping you an email with the stack trace.
timc3almost 11 years ago
Looks really nice.<p>Have you thought that instead of sending the results to elasticsearch? Instead of using something like newrelic this could take it&#x27;s place..
评论 #7860185 未加载
评论 #7860734 未加载
rmcalmost 11 years ago
I wrote <a href="https://github.com/rory/django-sql-inspector" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rory&#x2F;django-sql-inspector</a> a django app to profile SQL queries done in multiple pages, including showing stack trace of where it&#x27;s being called. You can find out which function(s) are responsible for long SQL requests.
SEJeffalmost 11 years ago
What is the overhead (roughly) for this guy? I do absolutely <i>love</i> the idea of using elasticsearch for this instead of a traditional database.<p>Using celery or django-rq to delay the processing also seems reasonable.
评论 #7860379 未加载
notdonspauldingalmost 11 years ago
After reading through this intro, it isn&#x27;t clear to me if I can use the decorator or context manager to profile code outside the request&#x2F;response cycle.<p>Any ideas if that&#x27;s the case?
评论 #7859258 未加载
ergo14almost 11 years ago
For people interested in production monitoring I&#x27;ve created <a href="https://appenlight.com" rel="nofollow">https:&#x2F;&#x2F;appenlight.com</a> - and our python middleware will integrate and start timing django applications without any code changes required (except 3 lines to load middleware itself).<p>@mtford great job!
philipnalmost 11 years ago
Thanks for posting this! Could you add a download link somewhere?
评论 #7860152 未加载
spanasikalmost 11 years ago
absolutely great tool!