For those interested, here are a couple of differences between this and django-debug-toolbar (an excellent, widely used utility that also provides SQL inspection).
1. django-debug-toolbar can be difficult to enable if you aren't serving from localhost (for security reasons, because your settings are included in the UI). This project looks much simpler to enable, as you just set DEBUG=True in your settings.
2. django-debug-toolbar provides its information through a UI component embedded in your own UIs, but it doesn't help you with profiling HTTP APIs that don't have a UI. In contrast, this project puts some profiling information in the response headers, and SQL logs are sent to a logger. I think this use case is where Django Query Inspector shows a lot of utility.
Always nice to see more tools, and the X- headers idea is pretty neat. I've been using a mix of django-debug-toolbar (mentioned repeatedly in this thread), and django-devserver[1], which is more useful when writing non-html serving APIs and suchlike where a toolbar doesn't make sense.
I'm also fan of Django Debug Toolbar, enough so that I adopted the package in Debian. Unfortunately, there isn't an active upstream maintainer right now. As the README file says:
"There's no active maintainer at this time. You're welcome to file issues and pull requests but you may receive no answer until a new maintainer steps up."
I think some of the aggregation of query counts here would be helpful. I'm also a django debug tool bar user. I typically scan the SQL and can visually identify the repeats. My wish there would be aggregating the counts, sum'ing time, and sorting by time rather than execution order.
Shameless self promotion: Here is a decorator I wrote to help me inspect performance issues using Django's DOM. The nice thing about this over Django-Debug-Toolbar is that it runs single function rather than the whole view helping you narrow down an issue. You can also add filters to remove unwanted noise during your analysis.
Theres also silk (https://github.com/mtford90/silk) which was posted recently. It doesnt seem to do the duplicate detection as yours does but does provide a UI and works with APIs. Also gives you a history.
The developer probably wasn't aware of it but there's an opensource project which is trying to get a standardized profiler going for all web dev platforms: http://miniprofiler.com
It would be good to see projects like this done on top of the miniprofiler base.
Probably nobody is looking at this thread now, but just in case... I've had similar code I use in Flask apps for awhile now and this project inspired me to turn it into a legit Flask Extension:
[+] [-] jlafon|11 years ago|reply
1. django-debug-toolbar can be difficult to enable if you aren't serving from localhost (for security reasons, because your settings are included in the UI). This project looks much simpler to enable, as you just set DEBUG=True in your settings.
2. django-debug-toolbar provides its information through a UI component embedded in your own UIs, but it doesn't help you with profiling HTTP APIs that don't have a UI. In contrast, this project puts some profiling information in the response headers, and SQL logs are sent to a logger. I think this use case is where Django Query Inspector shows a lot of utility.
[+] [-] StavrosK|11 years ago|reply
[+] [-] nwenzel|11 years ago|reply
That's been my only complaint about an otherwise fantastic debug tool.
Anyone have any thoughts on running multiple debug tools like these together? I think mostly you would get comfortable with one and stick with it.
[+] [-] shabble|11 years ago|reply
[1] https://github.com/dcramer/django-devserver
[+] [-] aweb|11 years ago|reply
[+] [-] andrewsomething|11 years ago|reply
"There's no active maintainer at this time. You're welcome to file issues and pull requests but you may receive no answer until a new maintainer steps up."
[+] [-] nwenzel|11 years ago|reply
[+] [-] senko|11 years ago|reply
[+] [-] mjs7231|11 years ago|reply
http://pushingkarma.com/notebook/django-decorator-print-sql-...
[+] [-] epicserver|11 years ago|reply
[+] [-] Joeri|11 years ago|reply
The developer probably wasn't aware of it but there's an opensource project which is trying to get a standardized profiler going for all web dev platforms: http://miniprofiler.com
It would be good to see projects like this done on top of the miniprofiler base.
[+] [-] noise|11 years ago|reply
https://github.com/noise/flask-queryinspect
[+] [-] googletron|11 years ago|reply
[+] [-] abhn|11 years ago|reply