# Action Profiler 1.0.0

**URL:** <https://www.ruby-forum.com/t/action-profiler-1-0-0/49105>\
**Category:** Rails\
**Created:** [November 29, 2005, 11:30pm UTC](https://www.ruby-forum.com/t/action-profiler-1-0-0/49105 "2005-11-29T23:30:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![drbrain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/858c86/32.png) [@drbrain](https://www.ruby-forum.com/u/drbrain)\
**Post date:** [November 29, 2005, 11:30pm UTC](https://www.ruby-forum.com/t/action-profiler-1-0-0/49105/1 "2005-11-29T23:30:42Z")

</div>

= Action Profiler

Full Documentation:

[http://rails-analyzer.rubyforge.org/action\_profiler](http://rails-analyzer.rubyforge.org/action_profiler)

Rubyforge Project:

[http://rubyforge.org/projects/rails-analyzer](http://rubyforge.org/projects/rails-analyzer)

== About

Action Profiler allows you to profile a single Rails action to  
determine what  
to optimize. You can use the Production Log Analyzer and action\_grep to  
determine which actions you should profile and what arguments to use.

Information on the Production Log Analyzer can be found at:

[http://rails-analyzer.rubyforge.org/pl\_analyze](http://rails-analyzer.rubyforge.org/pl_analyze)

=== Profilers

Action Profiler REQUIRES Ruby 1.8.3, even if you just use Ruby’s builtin  
profiler.

Action Profiler can use three profilers, Ruby’s builtin profiler class,  
Shugo M.‘s Prof or Ryan D.’ ZenProfile.

Shugo M.'s Prof: [http://raa.ruby-lang.org/project/ruby-prof](http://raa.ruby-lang.org/project/ruby-prof)

Ryan D.’ ZenProfile: [http://rubyforge.org/frs/](http://rubyforge.org/frs/)?  
group\_id=712&release\_id=2476

=== Running Action Profiler

Typically, action\_profiler will be run from the root of your Rails  
application:

$ action\_profiler GamesController#index  
Warmup…  
Profiling…  
[profile output]  
$

If you need to run action\_profiler from some other path, the -p  
command line  
option can be used to specify the location of your Rails application.

action\_profiler -p ~/Worx/X/CCR GamesController#index

Parameters can be specified after the controller and action:

action\_profiler GamesController#index “:id =\> 1”

If you need to make sure a page is working correctly you can specify -  
o. No  
profiling will occur and the generated page will be printed out instead:

$ action\_profiler -o GamesController#show “:id =\> 1”  
[lots of HTML output]  
$

== Gem Installation

gem install action\_profiler

== Download

[http://rubyforge.org/frs/?group\_id=586](http://rubyforge.org/frs/?group_id=586)

(Sorry, no manual installation script is available for the .tgz)

–  
Eric H. - removed\_email\_address@domain.invalid - [http://segment7.net](http://segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![drbrain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/858c86/32.png) [@drbrain](https://www.ruby-forum.com/u/drbrain)\
**Post date:** [December 2, 2005, 9:21pm UTC](https://www.ruby-forum.com/t/action-profiler-1-0-0/49105/2 "2005-12-02T21:21:28Z")

</div>

Is it possible to drill down further, e.g. figure out exactly which  
queries in PGconn#exec are  
using the most time? Any idea what Site#allow\_concurrency is?

Warmup…  
Profiling…  
% cumulative self self total  
time seconds seconds calls ms/call ms/call name  
29.63 0.08 0.08 14 5.71 5.71  
Site#allow\_concurrency  
11.11 0.11 0.03 1 30.00 30.00 PGconn#exec  
3.70 0.12 0.01 1 10.00 20.00  
ActionController::Routing::RouteSet#generate

thanks  
csn

— Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> == About  
> === Profilers  
> group\_id=712&release\_id=2476  
> $
> 
> gem install action\_profiler
> 
> [http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

* * *

Do You Yahoo!?  
Tired of spam? Yahoo! Mail has the best spam protection around

> **[\[object](https://mail.yahoo.com/)**
>
> \[object
