I am running rails 2.1 and cannot get ruby-prof, or more acurately, the script/performance/request to work. Installing ruby-prof I get this: sudo gem install ruby-prof Building native extensions. This could take a while... Successfully installed ruby-prof-0.6.0 1 gem installed Installing ri documentation for ruby-prof-0.6.0... No definition for prof_get_cpu_frequency No definition for prof_set_cpu_frequency Installing RDoc documentation for ruby-prof-0.6.0... No definition for prof_get_cpu_frequency No definition for prof_set_cpu_frequency Which looks like it is having problems in the docs, so ok. If I run: script/performance/request lib/prof_scripts/store_browse_profiler.rb I get: Warming up once 3.80 sec, 1 requests, 0 req/sec Profiling 100x `gem install ruby-prof` to use the profiler but doing a gem list has: ruby-prof (0.6.0) I can run ruby-prof from the command line: ruby-prof lib/prof_scripts/store_browse_profiler.rb But it (obviously) doesn''t understand the file as it has a ''get'' in it. Help! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
paulodeon-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2008-Jul-26 11:05 UTC
Re: does ruby-prof actually work?
Phil, Did you have any joy getting this working? I have the exact same problem as you. Paul On Jul 18, 3:06 pm, phil <p...-o0Q4Q1ys/oVBDgjK7y7TUQ@public.gmane.org> wrote:> I am running rails 2.1 and cannot get ruby-prof, or more acurately, > the script/performance/request to work. > > Installing ruby-prof I get this: > sudo gem install ruby-prof > Building native extensions. This could take a while... > Successfully installed ruby-prof-0.6.0 > 1 gem installed > Installing ri documentation for ruby-prof-0.6.0... > > No definition for prof_get_cpu_frequency > > No definition for prof_set_cpu_frequency > Installing RDoc documentation for ruby-prof-0.6.0... > > No definition for prof_get_cpu_frequency > > No definition for prof_set_cpu_frequency > > Which looks like it is having problems in the docs, so ok. > > If I run: > script/performance/request lib/prof_scripts/store_browse_profiler.rb > > I get: > Warming up once > 3.80 sec, 1 requests, 0 req/sec > > Profiling 100x > `gem install ruby-prof` to use the profiler > > but doing a gem list has: > ruby-prof (0.6.0) > > I can run ruby-prof from the command line: > ruby-prof lib/prof_scripts/store_browse_profiler.rb > > But it (obviously) doesn''t understand the file as it has a ''get'' in > it. > > Help!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Please use Jeremy Kamper''s ruby-prof : http://github.com/jeremy/ruby-prof/tree/master gem sources -a http://gems.github.com sudo gem install jeremy-ruby-prof On Fri, Jul 18, 2008 at 3:06 PM, phil <phil-o0Q4Q1ys/oVBDgjK7y7TUQ@public.gmane.org> wrote:> > I am running rails 2.1 and cannot get ruby-prof, or more acurately, > the script/performance/request to work. > > Installing ruby-prof I get this: > sudo gem install ruby-prof > Building native extensions. This could take a while... > Successfully installed ruby-prof-0.6.0 > 1 gem installed > Installing ri documentation for ruby-prof-0.6.0... > > No definition for prof_get_cpu_frequency > > No definition for prof_set_cpu_frequency > Installing RDoc documentation for ruby-prof-0.6.0... > > No definition for prof_get_cpu_frequency > > No definition for prof_set_cpu_frequency > > Which looks like it is having problems in the docs, so ok. > > If I run: > script/performance/request lib/prof_scripts/store_browse_profiler.rb > > I get: > Warming up once > 3.80 sec, 1 requests, 0 req/sec > > Profiling 100x > `gem install ruby-prof` to use the profiler > > but doing a gem list has: > ruby-prof (0.6.0) > > I can run ruby-prof from the command line: > ruby-prof lib/prof_scripts/store_browse_profiler.rb > > But it (obviously) doesn''t understand the file as it has a ''get'' in > it. > > Help! > > >-- Cheers! - Pratik http://m.onkey.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
paulodeon-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2008-Jul-28 10:02 UTC
Re: does ruby-prof actually work?
Pratik, Thanks for the response, but that didnt work for me. With both ruby-profs installed I get: ./test/performance/tree_profiler.rb:1: undefined method `get'' for main:Object (NoMethodError) After uninstalling ruby-prof with just jeremy-ruby-prof I get: dyld: NSLinkModule() error dyld: Symbol not found: _rb_os_allocated_objects Referenced from: /usr/local/lib/ruby/gems/1.8/gems/jeremy-ruby- prof-0.6.1/lib/ruby_prof.bundle Expected in: flat namespace Trace/BPT trap In both instances I restarted the server after install...thinking that ruby-prof might need to get its hooks into the server somehow. Paul On Jul 27, 4:26 am, Pratik <pratikn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Please use Jeremy Kamper''s ruby-prof :http://github.com/jeremy/ruby-prof/tree/master > > gem sources -ahttp://gems.github.com > sudo gem install jeremy-ruby-prof > > > > On Fri, Jul 18, 2008 at 3:06 PM, phil <p...-o0Q4Q1ys/oVBDgjK7y7TUQ@public.gmane.org> wrote: > > > I am running rails 2.1 and cannot get ruby-prof, or more acurately, > > the script/performance/request to work. > > > Installing ruby-prof I get this: > > sudo gem install ruby-prof > > Building native extensions. This could take a while... > > Successfully installed ruby-prof-0.6.0 > > 1 gem installed > > Installing ri documentation for ruby-prof-0.6.0... > > > No definition for prof_get_cpu_frequency > > > No definition for prof_set_cpu_frequency > > Installing RDoc documentation for ruby-prof-0.6.0... > > > No definition for prof_get_cpu_frequency > > > No definition for prof_set_cpu_frequency > > > Which looks like it is having problems in the docs, so ok. > > > If I run: > > script/performance/request lib/prof_scripts/store_browse_profiler.rb > > > I get: > > Warming up once > > 3.80 sec, 1 requests, 0 req/sec > > > Profiling 100x > > `gem install ruby-prof` to use the profiler > > > but doing a gem list has: > > ruby-prof (0.6.0) > > > I can run ruby-prof from the command line: > > ruby-prof lib/prof_scripts/store_browse_profiler.rb > > > But it (obviously) doesn''t understand the file as it has a ''get'' in > > it. > > > Help! > > -- > Cheers! > - Pratikhttp://m.onkey.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes, I first uninstalled ruby-prof: sudo gem uninstall ruby-prof then did gem sources -a http://gems.github.com sudo gem install jeremy-ruby-prof generated an empty file called prof_script.rb Get this error: $ ruby-prof lib/prof_script.rb /Library/Ruby/Gems/1.8/gems/jeremy-ruby-prof-0.6.1/lib/ruby-prof/ flat_printer.rb:40:in `print_methods'': wrong argument type Symbol (expected Proc) (TypeError) from /Library/Ruby/Gems/1.8/gems/jeremy-ruby-prof-0.6.1/lib/ruby-prof/ flat_printer.rb:33:in `print_threads'' from /Library/Ruby/Gems/1.8/gems/jeremy-ruby-prof-0.6.1/lib/ruby-prof/ flat_printer.rb:32:in `each'' from /Library/Ruby/Gems/1.8/gems/jeremy-ruby-prof-0.6.1/lib/ruby-prof/ flat_printer.rb:32:in `print_threads'' from /Library/Ruby/Gems/1.8/gems/jeremy-ruby-prof-0.6.1/lib/ruby-prof/ flat_printer.rb:26:in `print'' from /Library/Ruby/Gems/1.8/gems/jeremy-ruby-prof-0.6.1/bin/ruby-prof: 171 from /usr/bin/ruby-prof:19 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I also see this error dyld: NSLinkModule() error dyld: Symbol not found: _rb_os_allocated_objects Referenced from: /opt/local/lib/ruby/gems/1.8/gems/jeremy-ruby-prof-0.6.1/lib/ruby_prof.bundle Expected in: flat namespace Trace/BPT trap -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---