Michael Schuerig
2005-Jun-22 00:14 UTC
Profiling a complete request-response cycle? Automated performance tests?
I''d like to get an idea where time is spent in my application. Right now everything is fast enough, but I''d prefer to feel less blind and ignorant. My general interest is to identify places where cycles are burned without good reason. More specifically, I''m curious how much time rendering of some views takes and how it compares to the time DB accesses take. For this purpose I''d like to profile complete request-response cycles for several actions. Also, I''d like to have several automated performance tests to ensure that further changes don''t worsen response time compared to a set baseline. Is anyone already doing these things and can provide some advise? Michael -- Michael Schuerig Nothing is as brilliantly adaptive mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org as selective stupidity. http://www.schuerig.de/michael/ --A.O. Rorty, The Deceptive Self
Michael Schuerig
2005-Jun-22 00:57 UTC
Re: Profiling a complete request-response cycle? Automated performance tests?
On Wednesday 22 June 2005 02:14, Michael Schuerig wrote:> My general interest is to identify places where cycles are burned > without good reason. More specifically, I''m curious how much time > rendering of some views takes and how it compares to the time DB > accesses take.It helps to look at the examples... actionpack/examples/benchmark.rb When I run this with profiling enabled, though, the profiler crashes: $ ruby benchmark.rb 1 true % cumulative self self total time seconds seconds calls ms/call ms/call name 4500.00 0.45 0.45 1 450.00 450.00 Profiler__.start_profile 0.00 0.45 0.00 1 0.00 0.00 Module#== 0.00 0.45 0.00 1 0.00 0.00 Object#require 0.00 0.45 0.00 1 0.00 10.00 #toplevel 0.00 0.45 0.00 1 0.00 450.00 Kernel.require /usr/lib/ruby/1.8/profiler.rb:27: undefined method `[]'' for nil:NilClass (NoMethodError) from /usr/lib/ruby/1.8/profiler.rb:5:in `require'' from ./../lib/../../activesupport/lib/active_support/dependencies.rb:202:in `require'' from benchmark.rb:33 Michael -- Michael Schuerig Face reality and stare it down mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org --Jethro Tull, Silver River Turning http://www.schuerig.de/michael/