# Performance analyzer from log file

**URL:** <https://www.ruby-forum.com/t/performance-analyzer-from-log-file/118629>\
**Category:** Rails\
**Created:** [October 29, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/performance-analyzer-from-log-file/118629 "2007-10-29T16:38:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![helzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@helzer](https://www.ruby-forum.com/u/helzer)\
**Post date:** [October 29, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/performance-analyzer-from-log-file/118629/1 "2007-10-29T16:38:54Z")

</div>

Hi,

I’m looking for a tool that can go through the production / test log  
files and give me some statistics on performance. Nothing fancy, just  
the information on how much time is spent on different actions  
(render / DB).

For production, I’m using a mongrel cluster, so the log file includes  
the data from all instances…

Any suggestions?

Thanks,  
Helzer

---

<div class="post-metadata">

**Author:** ![helzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@helzer](https://www.ruby-forum.com/u/helzer)\
**Post date:** [October 29, 2007, 4:41pm UTC](https://www.ruby-forum.com/t/performance-analyzer-from-log-file/118629/2 "2007-10-29T16:41:14Z")

</div>

On 29 Oct 2007, at 15:37, helzer wrote:

> 

pl\_analyze (gem install production\_log\_analyzer) can do this, but  
requires that your logfiles have a certain format (you need to be  
using a syslog logger)

Fred

---

<div class="post-metadata">

**Author:** ![helzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@helzer](https://www.ruby-forum.com/u/helzer)\
**Post date:** [October 29, 2007, 5:17pm UTC](https://www.ruby-forum.com/t/performance-analyzer-from-log-file/118629/3 "2007-10-29T17:17:29Z")

</div>

Hi Fred,

I got the gem installed and the syslogger, syslog-ng packages, but I  
can’t configure the syslog correctly.  
Do you know of any instructions that I can follow? I’m running on  
Ubuntu.

Thanks,  
Amir

---

<div class="post-metadata">

**Author:** ![helzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@helzer](https://www.ruby-forum.com/u/helzer)\
**Post date:** [October 29, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/performance-analyzer-from-log-file/118629/4 "2007-10-29T17:21:00Z")

</div>

On 29 Oct 2007, at 16:16, helzer wrote:

> Hi Fred,
> 
> I got the gem installed and the syslogger, syslog-ng packages, but I  
> can’t configure the syslog correctly.  
> Do you know of any instructions that I can follow? I’m running on  
> Ubuntu.

We let our sysadmins worry about that 🙂  
In our production.rb we put

gem ‘rails\_analyzer\_tools’  
require ‘analyzer\_tools/syslog\_logger’

config.logger = SyslogLogger.new ‘re5ult’  
config.logger.level = Logger::INFO  
which seems to do the trick

Fred

---

<div class="post-metadata">

**Author:** ![helzer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/e19b73/32.png) [@helzer](https://www.ruby-forum.com/u/helzer)\
**Post date:** [February 25, 2008, 8:47pm UTC](https://www.ruby-forum.com/t/performance-analyzer-from-log-file/118629/5 "2008-02-25T20:47:03Z")

</div>

I found myself going round in trial-and-error circles using the  
syslogger solution suggested by the documentation that goes along with  
those gems.

Save yourself the bother and take a look at  
[http://nubyonrails.com/articles/a-hodel-3000-compliant-logger-for-the-rest-of-us](http://nubyonrails.com/articles/a-hodel-3000-compliant-logger-for-the-rest-of-us)

You will still need the gems to analyze the logs, but just use the code  
provided by Geoffrey Grosenbach to get your logs into the correct  
format.
