Rail’s Analyzer with Klass
Download it: rawk.rb
run ruby rawk.rb -h for help.
I wanted to analyze Spongecell’s log file to see where the most of our cpu time was being used. I checked out rails-analyzer.rubyforge.org and after navigating myself in circles following the links I finally decided to download some stuff, install some gems, and give it a try. It didn’t work.
I didn’t understand why I needed whole packages just to look at one log file. I could get a lot of information from the logs just using grep. So I started to write a tool in awk until Tom told me I should use ruby.
Of course I should use ruby.
Rawk is the result. Many sets of data are presented and grouped in many ways. The first thing you will want to optimize are probably the actions that your server sepnds the most time on. I ran rawk on our log a few minutes ago:
The four most expensive requests for Spongecell are the poller (for keeping your calendar display up to date), iCalendar feeds from Spongecell, the normal web view of Spongecell, and RSS feeds.
Please give this tool a try and let me know what you think. I’m happy to include improvements or make modifications.
** This script is released as beerware, something I first heard about on a mac bittorrent client. They defined it as software that is free and if you like it you should buy yourself a beer.