# Rails 2 & Profiler

**URL:** <https://www.ruby-forum.com/t/rails-2-profiler/123848>\
**Category:** Rails\
**Created:** [December 21, 2007, 8:07am UTC](https://www.ruby-forum.com/t/rails-2-profiler/123848 "2007-12-21T08:07:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![subimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@subimage](https://www.ruby-forum.com/u/subimage)\
**Post date:** [December 21, 2007, 8:07am UTC](https://www.ruby-forum.com/t/rails-2-profiler/123848/1 "2007-12-21T08:07:21Z")

</div>

So the new profiler in Rails 2.0 looks great - except I can’t figure out  
how  
to use the damn thing with my application.  
I have two unique things that might be preventing me from enjoying the  
profiler

- My app requires a login
- My app request a subdomain be present to function

Has anyone worked with profiler that can help me out here, or perhaps  
link  
me to a good write up on the subject? I googled around, searched  
technorati,  
etc - but nothing was there to be found. Documentation on this effort  
seems  
to be non-existent, and cracking the source isn’t helping me much  
either.

Someone point me in the right direction.

* * *

## seth at subimage interactive

## [http://sublog.subimage.com](http://sublog.subimage.com)

## Cashboard - Estimates, invoices, and time tracking software - for free! [http://www.getcashboard.com](http://www.getcashboard.com)

Substruct - Open source RoR e-commerce software.  
[http://dev.subimage.com/projects/substruct](http://dev.subimage.com/projects/substruct)

---

<div class="post-metadata">

**Author:** ![subimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@subimage](https://www.ruby-forum.com/u/subimage)\
**Post date:** [December 21, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/rails-2-profiler/123848/2 "2007-12-21T22:35:28Z")

</div>

To follow up, with a little help from #rubyonrails I figured out that  
you  
need to use integration test commands to get it running. Armed with that  
information, I’ve gotten a little further, but not much. I’m now getting  
some error that looks like s UTF-8 problem…  
[http://pastie.caboo.se/pastes/131238](http://pastie.caboo.se/pastes/131238)

Help?

On Dec 20, 2007 11:06 PM, subimage interactive [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ## to be non-existent, and cracking the source isn’t helping me much either.
> 
> Substruct - Open source RoR e-commerce software.  
> [http://dev.subimage.com/projects/substruct](http://dev.subimage.com/projects/substruct)

## –

## seth at subimage interactive

## [http://sublog.subimage.com](http://sublog.subimage.com)

## Cashboard - Estimates, invoices, and time tracking software - for free! [http://www.getcashboard.com](http://www.getcashboard.com)

Substruct - Open source RoR e-commerce software.  
[http://dev.subimage.com/projects/substruct](http://dev.subimage.com/projects/substruct)

---

<div class="post-metadata">

**Author:** ![subimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@subimage](https://www.ruby-forum.com/u/subimage)\
**Post date:** [December 22, 2007, 12:24am UTC](https://www.ruby-forum.com/t/rails-2-profiler/123848/3 "2007-12-22T00:24:25Z")

</div>

On 12/20/07, subimage interactive [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> etc - but nothing was there to be found. Documentation on this effort seems  
> to be non-existent, and cracking the source isn’t helping me much either.
> 
> Someone point me in the right direction.

The new request profiler is young and experimental still; thanks for  
giving it a spin.

Write an integration script much like you would for integration tests.  
Example: test/performance/authorize\_user\_and\_redirect\_back.rb

host! ‘[foo.com](http://foo.com)’

get ‘/admin/posts/1’  
follow\_redirect!  
raise unless path == ‘/login’

post ‘/login’, :username =\> ‘john’, :password =\> ‘doe’  
follow\_redirect!  
raise unless path == ‘/admin/posts/1’

then run

./script/performance/request  
test/performance/authorize\_user\_and\_redirect\_back.rb

and check out the generated html call graph.

The call graph is hard to interpret at first. We’ll have to work with  
the ruby-prof guys to improve that.

Best,  
jeremy

---

<div class="post-metadata">

**Author:** ![subimage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@subimage](https://www.ruby-forum.com/u/subimage)\
**Post date:** [December 22, 2007, 11:18am UTC](https://www.ruby-forum.com/t/rails-2-profiler/123848/4 "2007-12-22T11:18:38Z")

</div>

Thanks Jeremy for the help here and on IRC 🙂  
Anything that can be done to improve the readability of the graph would  
be  
really nice. As it is, I feel like I’m looking at a puzzle that I don’t  
yet  
know how to figure out…

On Dec 21, 2007 3:24 PM, Jeremy K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 
> 
> raise unless path == ‘/login’  
> and check out the generated html call graph.
> 
> The call graph is hard to interpret at first. We’ll have to work with  
> the ruby-prof guys to improve that.
> 
> Best,  
> jeremy
> 
> >

## –

## seth at subimage interactive

## [http://sublog.subimage.com](http://sublog.subimage.com)

## Cashboard - Estimates, invoices, and time tracking software - for free! [http://www.getcashboard.com](http://www.getcashboard.com)

Substruct - Open source RoR e-commerce software.  
[http://dev.subimage.com/projects/substruct](http://dev.subimage.com/projects/substruct)
