I have a method that's taking around 45 seconds to run, but before I tweak it I want to run the profiler on it, to learn exactly how much time each part requires. The method is in the Flag controller and is called qu_test. When I run this from the commandline I get:
$ ./script/performance/profiler 'Flag.qu_test' 1 2>&1
Using the standard Ruby profiler.
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1129:in `method_missing': private method `qu_test' called for Flag:Class (NoMethodError)
from (eval):1:in `profile_me'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:21:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
Moving the method into the flag.rb file doesn't seem to make a difference. I think I am missing something fundamental about namespaces in Ruby- anyone know a fix for this problem, and what are some good resources for learning more about namespaces in general?