phil | 18 Jul 16:04

does ruby-prof actually work?


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
(Continue reading)

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...@...> 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.
(Continue reading)

Pratik | 27 Jul 05:26

Re: does ruby-prof actually work?


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@...> 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.
>
(Continue reading)

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...@...> 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
(Continue reading)

phil | 28 Jul 14:15

Re: does ruby-prof actually work?


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@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
(Continue reading)


Gmane