Skip to content

A command line tool that analyzes request logfiles (e.g. Rails, Merb, Apache) to produce a performance report.

License

Notifications You must be signed in to change notification settings

apalmblad/request-log-analyzer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Request-log-analyzer

This is a simple command line tool to analyze request log files in various formats to produce a performance report. Its purpose is to find what actions are best candidates for optimization.

  • Analyzes log files. Currently supports: Amazon S3, Apache, Delayed::Job, Merb, Mysql, PostgreSQL, Rack, Rails and more.

  • Combines multiple files and decompresses compressed files, which comes in handy if you are using logrotate.

  • Uses several metrics, including cumulative request time, mean request time, process blockers, database and rendering time, HTTP methods and statuses, Rails action cache statistics, etc.) (Sample output: github.com/wvanbergen/request-log-analyzer/wiki/sample-output)

  • Low memory footprint and reasonably fast, so it is safe to run on a production server.

  • MIT licensed

See the project wiki at github.com/wvanbergen/request-log-analyzer/wiki for documentation and additional information.

Installation & basic usage

Install request-log-analyzer as a Ruby gem (you might need to run this command as root by prepending sudo to it):

$ gem install request-log-analyzer

To analyze a Rails log file and produce a performance report, run request-log-analyzer like this:

$ request-log-analyzer log/production.log

For more details, other file formats, and available command line options, see the project’s wiki at github.com/wvanbergen/request-log-analyzer/wiki

Changes in this fork

I’ve added support for tracking the requests keyed on PID, which cuts way down on the number of unparsed rows due to requests being loggedout of order. I’ve added a Syslog module that decorates the other file formats with syslog regexps and captures, to pull out PID in many more ccases.

However, I was unable to get the decoration working with unioned RegExps, so this release only supports Rails 2.2 format logs.

Feel free to email me at [email protected] for details. Thanks to TeamPages.com (www.teampages.com) for allowing the release of this.

Additional information

Request-log-analyzer was designed and built by Willem van Bergen and Bart ten Brinke.

Do you have a rails application that is not performing as it should? If you need an expert to analyze your application, feel free to contact either Willem van Bergen ([email protected]) or Bart ten Brinke ([email protected]).

About

A command line tool that analyzes request logfiles (e.g. Rails, Merb, Apache) to produce a performance report.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%