- 浏览: 148746 次
- 性别:
- 来自: 北京
文章分类
最新评论
参考网址:
http://github.com/wvanbergen/request-log-analyzer
http://www.letrails.cn/archives/rails-performance-optimization-guide/
http://wiki.github.com/wvanbergen/request-log-analyzer/basic-usage
Getting started
Use RubyGems to install request-log-analyzer on your computer:
Now you can run request-log-analyzer to analyze a log file:
Basic usage
If you want to analyze a Rails production log file, use the following syntax:
This will generate a report, similar to our Sample output. If you want analyze multiple files (because of logrotate or multiple mongrel log files), you can provide multiple filenames or use wildcards. The files will be process in the order that they are given on the command line.
Parsing from the standard input
Request-log-analyzer can also parse the standard input by using - or STDIN as filename. This is great in combination with the UNIX tail -f command to parse information live, as it is written to the log file.
Request-log-analyzer will then parse any information that is written to the log file until it is stopped by pressing CTRL+C, after which it will present the performance report for all data that has been collected up to that point.
Examples
http://github.com/wvanbergen/request-log-analyzer
http://www.letrails.cn/archives/rails-performance-optimization-guide/
http://wiki.github.com/wvanbergen/request-log-analyzer/basic-usage
Getting started
Use RubyGems to install request-log-analyzer on your computer:
$ gem install request-log-analyzer
Now you can run request-log-analyzer to analyze a log file:
$ request-log-analyzer log/production.log
Basic usage
If you want to analyze a Rails production log file, use the following syntax:
$ request-log-analyzer production.log
This will generate a report, similar to our Sample output. If you want analyze multiple files (because of logrotate or multiple mongrel log files), you can provide multiple filenames or use wildcards. The files will be process in the order that they are given on the command line.
$ request-log-analyzer mongrel.2008-11.log mongrel.2008-12.log mongrel.2009-01.log
$ request-log-analyzer production.*.log
Parsing from the standard input
Request-log-analyzer can also parse the standard input by using - or STDIN as filename. This is great in combination with the UNIX tail -f command to parse information live, as it is written to the log file.
$ tail -f production.log | request-log-analyzer -
Request-log-analyzer will then parse any information that is written to the log file until it is stopped by pressing CTRL+C, after which it will present the performance report for all data that has been collected up to that point.
Examples
Write an HTML report to report.html: $ request-log-analyzer log/production.log --file report.html --output HTML Only use uncolored ASCII characters in the report: $ request-log-analyzer log/production.log --boring Create a database named requests.db with all parsed request information $ request-log-analyzer log/production.log --database requests.db
发表评论
-
Google App Engine and others
2010-09-15 11:27 799有用的技术文章 先记载 有空 研究下 さくっとRails ... -
基于jquery和mini_magick的图片裁剪
2010-09-15 11:07 1455引用网址 http://duyouhua1214.iteye ... -
ruby gem相关命令使用
2010-08-26 12:45 1596gem相关命令使用 1.显示gem的帮助和版本 gem – ... -
深入理解alias, alias_method和alias_method_chain
2010-08-06 17:14 969http://blackanger.blog.51cto.co ... -
Rails 3 特点
2010-08-06 16:38 912真的想留下来 http://railslove.com/w ... -
Fix N+1 Queries
2010-08-06 16:16 914http://rails-bestpractices.com/ ... -
query-reviewer sql explain and review in the page
2010-08-06 12:20 1325引用网址 http://github.com/dsboulde ... -
IE7 Bug导致Rails Session保存失败
2010-08-06 10:56 972http://www.letrails.cn/archives ... -
Rails保存记录而不更新时间戳
2010-08-06 10:54 1350引用地址: http://www.letrails.cn/a ... -
how to generate qrcode on ror
2010-02-04 16:27 8721. In your rails project, in ... -
rmagick ror 上 安装
2009-11-18 09:06 855rmgick 安装规范 ror很多人现在在用了,但是发现 ... -
Update Rails to 2.2.2 (Rails 2.2.2)
2009-03-08 14:53 988gem install -v=2.2.2 rails Suc ... -
Use helpers in controllers or models
2009-01-19 16:22 928引用http://snipplr.com/view/2505/ ... -
open-flash-chart
2008-11-07 14:07 2429http://pullmonkey.com/2008/7/23 ... -
rake db:migrate
2008-11-07 11:58 1279【ruby on rails】rake db:migrate ... -
rss maker
2008-11-07 11:43 1093http://gdgdlog.net/log/show/130 ... -
acts_as_authenticated
2008-11-07 11:35 1112ruby script/plugin install act ... -
validates
2008-11-07 11:24 1065先週ずっとインフルエンザでダウンしてました。 今日はvail ... -
rails で model の変更を監視するプラグイン
2008-11-07 11:12 1363acts_as_modified モデルの変更を監視して、各 ... -
exception_notification
2008-11-07 11:03 12011 applicattion.rb 配置 incl ...
评论