Logs - Rendering + DB don't add up to Completed?

Completed in 1.48324 (0 reqs/sec) | Rendering: 0.08862 (5%) | DB:
0.00000 (0%)

In most production logs I have seen rendering plus db comes close to
adding up to 100%; maybe 60% to 80%.

In this new app, I am getting the results above. The 0% DB I assume
comes from a cached query.

What I don’t get is what is happening with the rest of the time?

  1. In general, where is this time accounted for?

  2. Any guess on what might be happening?

I went through the recent railscasts and ran rawk plus
script/performance request (result attached). The biggest offenders in
my app are IO#read (20%) and MySQL#get_length (10%). This makes some
sense because I am requesting a lot of records from the db but if so,
why is DB time listed as 0%.

Any thoughts or pointers would be appreciated.

Thanks,

John

The time is generally proportional.

It’s hard to do even vaguely accurate profiling on an object from
within the object itself (which is what Rails is here trying to do).

It’s just a vague proportional indicator of how much time things will
be taking (ie 50% database, 50% rendering for example).

Julian

Learn Ruby on Rails! CHECK OUT THE FREE VIDS (LIMITED TIME) NEW VIDEO
OUT 3rd APRIL
http://sensei.zenunit.com/