News for hackers. Stuff that matters.
Re:Improve developer habits by showing time cost of DB queries by holman on Wednesday April 16, 2014 @11:48PM (#7601925)
Love things like this.

Here's a screenshot expanded version of our staff bar on GitHub.com:

http://cl.ly/image/0O0N183x2F44

Most of those numbers are clickable. The graphs button on the left links to a flame graph (https://www.google.com/search?q=flame+graph) Ruby calls of the page. The microscope button is a sorted listing of CPU time and idle time by file that went into the page's render. The template number links to a timing breakdown of all the partials that went into the view. The SQL timing links to a breakdown of MySQL queries for that page, calling out N+1 queries, slow queries, or otherwise horrible database decisions. Depending on the page, we'll also have numbers for duration and queries spent in redis, elasticsearch, and gitrpc.

Our main github.com stuff is pretty tied into our stack, but one of our employees, Garrett Bjerkhoel, extracted a lot of this into peek, a very similar implementation of what we have on GitHub. We use peek in a ton of our smaller apps around the company. Here's the org: https://github.com/peek

Re:Improve developer habits by showing time cost of DB queries by xentronium on Thursday April 17, 2014 @06:07AM (#7602776)
Peek looks awesome. Hopefully, will use it for my next rails project.
Re:Improve developer habits by showing time cost of DB queries by test1235 on Thursday April 17, 2014 @05:47AM (#7602725)
Any chance of a blog post on this? I love your articles on inner workings.
Re:Improve developer habits by showing time cost of DB queries by ymendel on Friday April 18, 2014 @12:13PM (#7609767)
https://github.com/blog/1252-how-we-keep-github-fast went over a previous iteration, before this was extracted to peek.
Re:Improve developer habits by showing time cost of DB queries by jacquesct on Thursday April 24, 2014 @02:28PM (#7641994)
The link above (http://cl.ly/image/0O0N183x2F44) does not work FYI.
Re:Improve developer habits by showing time cost of DB queries by kevinburke on Friday April 18, 2014 @01:43PM (#7610267)
Clearly don't know enough about this, but was surprised the time spent drawing templates was so high.
Re:Improve developer habits by showing time cost of DB queries by faoiseamh on Thursday April 17, 2014 @01:18PM (#7604911)
This is great! I will definitely be using this in my own projects.