分享 time_bandits - 让 Rails Log 里面的耗时信息更加详细

huacnlee · May 24, 2012 · Last by Zernel replied at May 26, 2012 · 4079 hits

在 Rails 的 log 里面会有这样的信息显示本次请求的耗时都在什么地方 下面是 Ruby China 的例子:

Completed 200 OK in 154ms (Views: 130.9ms | Mongo: 16.0ms | Solr: 0.0ms)

time_bandits 这个东西可以帮你显示更多的信息

  • Memcached 请求耗时
  • GC 耗时
  • ...
Completed 200 OK in 680.378ms (Views: 28.488ms, ActiveRecord: 5.111ms(2q,0h), MC: 5.382(6r,0m), GC: 120.100(1), HP: 0(2000000,546468,18682541,934967))

https://github.com/skaes/time_bandits

这个真心是好东西,怎么没人顶

newrelic 才是王道

#2 楼 @flyerhzm 恩,这个东西能精确到代码,开发者模式也很易用,顺便分享一个链接http://www.oschina.net/news/26966/5-best-tools-for-rails-performance

好东西,谢谢分享

好东西,谢谢@huacnlee 分享

HP: 0(2000000,546468,18682541,934967)) 这个是什么呀? 看解释是 statistics on heap usage

谢谢分享

You need to Sign in before reply, if you don't have an account, please Sign up first.