Repository is archived
No commit activity in last 3 years
No release in over 3 years
RailsAnalyzer generates reports about requests processed by a Ruby on Rails server.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

RailsAnalyzer¶ ↑

RailsAnalyzer generates reports about requests processed by a Ruby on Rails server.

It analyzes the log files created by a Rails server. It can accept any number of files as its command line parameters. It defaults to use ‘log/production.log’ as its input when no filenames are provided.

Two different reporting engines process the log files:

  • TimeStats, which is concerned with when the request was made. It produces reports with the amount of hits recorded in the log file per time interval, and the relative amount of requests within a time interval. The relative interval simply lowers all hit counts until one hits zero. This makes it easy to filter out periodic requests.

  • HitStats, which is concerned with how fast the requests were handled. It produces reports with detailed time statistics for each request. It has two types of reports: with params and without params. Each type of report produces a number of files, each which is sorted by one of the following statistics for responses: fastest, slowest, sum, average, median, standard deviation and hit count.

Both engines produce .txt files as their only output.

  • TimeStats produces log_times_*.txt and log_times_*_relative.txt output.

  • HitStats produces the other log_*.txt and log_*_with_params.txt files.

Recent changes¶ ↑

Version 0.2.2¶ ↑

Added reports for slowest and fastest requests. Documentation updates.

Version 0.2.1¶ ↑

Bugfixes:

  • HitStats reports were not generated. They are working again.

  • Array#median always returns a float to prevent integer math (lack of) rounding problems.

Dependencies:

  • No longer rely on ActiveSupport. It was used for Array#sum and Array#group_by, which are now implemented in ArrayExt.

Specs:

  • Parts of UrlHits and Entries got specs to help debugging the HitStats bug.

  • Added specs for all ArrayExt methods.

Version 0.2.0¶ ↑

Split single-file script into one file per existing class. Introduced new classes to handle responsibilities that were not yet handled. Changed classes involved in generating URL hits-based reports to be more flexible. Generally refactored a lot of non-DRY code to be at least a bit nicer.

Version 0.1.0¶ ↑

Imported single-file script

Installation¶ ↑

From gem¶ ↑

The gem is located on github.

gem install Narnach-rails_analyzer -s http://gems.github.com

From git¶ ↑

From the project root, use rake to install:

git clone git://github.com/Narnach/rails_analyzer.git
cd rails_analyzer
rake install

This will build the gem and install it for you.

Syntax¶ ↑

rails_analyzer [log_file1] [log_file2] [..] [log_fileN]

When no log files are provided, log/production.log is used.

About¶ ↑

Author

Wes ‘Narnach’ Oldenbeuving (narnach@gmail.com)

Website

www.github.com/Narnach/rails_analyzer

Copyright

Copyright © 2008 Wes Oldenbeuving

License

MIT license. See MIT-LICENSE (in the gem directory) for license details.