Forum: Ruby Can't get ZenProfile to work

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
gavin (Guest)
on 2005-11-30 15:28
(Received via mailing list)
Slim:~ gavinkistner$ sudo gem update zenhacks
Upgrading installed gems...
Attempting remote upgrade of zenhacks
Attempting remote installation of 'zenhacks'
Successfully installed ZenHacks-1.0.1
Gems: [zenhacks] updated

Slim:~ gavinkistner$ cd /usr/local/lib/ruby/gems/1.8/gems/
ZenHacks-1.0.1/

Slim:/usr/local/lib/ruby/gems/1.8/gems/ZenHacks-1.0.1 gavinkistner$ ./
zenprofile-demo.sh
N=5000

ruby vanilla:
Iter = 5000, T = 0.05333900 sec, 0.00001067 sec / iter

real    0m0.216s
user    0m0.162s
sys     0m0.025s

ruby profiler:
Iter = 5000, T = 5.93053900 sec, 0.00118611 sec / iter
   %   cumulative   self              self     total
time   seconds   seconds    calls  ms/call  ms/call  name
52.57     3.07      3.07     5000     0.61     0.77  Integer#downto
18.66     4.16      1.09     5000     0.22     0.99  Factorial#factorial
13.18     4.93      0.77    20078     0.04     0.04  Fixnum#*
   5.99     5.28      0.35        1   350.00  5280.00  Range#each
   4.28     5.53      0.25       30     8.33    59.33  Kernel.require
   0.68     5.57      0.04      173     0.23     0.64  Config.expand
   0.51     5.60      0.03        5     6.00     8.00  Hash#each_pair
   0.51     5.63      0.03      849     0.04     0.04
Module#method_added
   0.51     5.66      0.03      374     0.08     0.08  Hash#[]=
   0.34     5.68      0.02      173     0.12     0.40  String#gsub!
   0.34     5.70      0.02        8     2.50     2.50  Kernel.eval
   0.34     5.72      0.02       28     0.71     0.71
Module#attr_accessor
   0.17     5.73      0.01       19     0.53     1.58
Gem::Specification#attribute
   0.17     5.74      0.01      105     0.10     0.10  Symbol#===
   0.17     5.75      0.01        9     1.11     1.11
Gem::Specification#array_attribute
   0.17     5.76      0.01        9     1.11     6.67  Array#each
   0.17     5.77      0.01      134     0.07     0.15  Kernel.dup
   0.17     5.78      0.01        6     1.67     1.67  Kernel.kind_of?
   0.17     5.79      0.01      165     0.06     0.06
Kernel.singleton_method_added
   0.17     5.80      0.01        4     2.50     2.50
Gem::Specification#attribute_alias_singular
   0.17     5.81      0.01       20     0.50     0.50
Module#module_eval
   0.17     5.82      0.01        1    10.00    40.00  Hash#each
   0.17     5.83      0.01      134     0.07     0.07
String#initialize_copy
   0.17     5.84      0.01        2     5.00     5.00
Module#attr_writer
   0.00     5.84      0.00        2     0.00     0.00  String#==
   0.00     5.84      0.00        2     0.00     5.00
Forwardable.def_instance_delegator
   0.00     5.84      0.00        1     0.00     0.00
Gem::Version::Requirement#default
   0.00     5.84      0.00        1     0.00     0.00  String#chomp!
   0.00     5.84      0.00        1     0.00     0.00
Module#alias_method
   0.00     5.84      0.00       44     0.00     0.00  Array#<<
   0.00     5.84      0.00        2     0.00     0.00  MatchData#[]
   0.00     5.84      0.00       40     0.00     0.00  Hash#[]
   0.00     5.84      0.00        3     0.00     0.00  Hash#keys
   0.00     5.84      0.00        1     0.00     0.00
Gem::Version#correct?
   0.00     5.84      0.00        1     0.00     0.00  Kernel.printf
   0.00     5.84      0.00        7     0.00     0.00  Regexp#quote
   0.00     5.84      0.00        1     0.00     0.00
Gem.ssl_available?
   0.00     5.84      0.00       11     0.00     0.00
Module#append_features
   0.00     5.84      0.00       10     0.00     0.00
Module#method_removed
   0.00     5.84      0.00        2     0.00     0.00
Module#private_class_method
   0.00     5.84      0.00        3     0.00     0.00  Module#public
   0.00     5.84      0.00        2     0.00     0.00  Regexp#match
   0.00     5.84      0.00        1     0.00     0.00  File#join
   0.00     5.84      0.00       70     0.00     0.00  Symbol#to_s
   0.00     5.84      0.00        7     0.00     0.00  Kernel.lambda
   0.00     5.84      0.00        1     0.00     0.00  Array#shift
   0.00     5.84      0.00        2     0.00     0.00  ENV.[]
   0.00     5.84      0.00        1     0.00     0.00  Float#/
   0.00     5.84      0.00        2     0.00     0.00  Regexp#initialize
   0.00     5.84      0.00       18     0.00     0.00
Module#define_method
   0.00     5.84      0.00       11     0.00     0.00  Module#include
   0.00     5.84      0.00        2     0.00     5.00
Gem::Specification#attributes
   0.00     5.84      0.00        2     0.00     0.00  Time#initialize
   0.00     5.84      0.00        1     0.00     0.00
Module#extend_object
   0.00     5.84      0.00        7     0.00     1.43
Gem::Specification#required_attribute
   0.00     5.84      0.00        1     0.00     0.00  Fixnum#>
   0.00     5.84      0.00        2     0.00     0.00  Time#now
   0.00     5.84      0.00        1     0.00     0.00  Object#initialize
   0.00     5.84      0.00        5     0.00     8.00
Gem::Security::Policy#initialize
   0.00     5.84      0.00        1     0.00     0.00
Gem::Version::Requirement#initialize
   0.00     5.84      0.00        2     0.00     0.00  File#dirname
   0.00     5.84      0.00        3     0.00     0.00
Module#method_undefined
   0.00     5.84      0.00        3     0.00     0.00  Array#join
   0.00     5.84      0.00      119     0.00     0.00  Class#inherited
   0.00     5.84      0.00        1     0.00    80.00  Hash#each_value
   0.00     5.84      0.00        9     0.00     0.00  Module#class_eval
   0.00     5.84      0.00        5     0.00     0.00  Hash#merge
   0.00     5.84      0.00        2     0.00     0.00  Module#attr
   0.00     5.84      0.00        2     0.00     0.00
Gem::Specification#read_only
   0.00     5.84      0.00        1     0.00     0.00  Time#-
   0.00     5.84      0.00        1     0.00     0.00
Gem::Version::Requirement#parse
   0.00     5.84      0.00       11     0.00     0.00  Module#included
   0.00     5.84      0.00        1     0.00     0.00  String#to_i
   0.00     5.84      0.00        5     0.00     0.00
Hash#initialize_copy
   0.00     5.84      0.00       10     0.00     4.00  Class#new
   0.00     5.84      0.00       15     0.00     0.00  Module#private
   0.00     5.84      0.00        1     0.00     0.00  Gem.user_home
   0.00     5.84      0.00       10     0.00     0.00
Module#remove_method
   0.00     5.84      0.00        7     0.00     0.00  Array#first
   0.00     5.84      0.00        1     0.00     0.00  Gem.find_home
   0.00     5.84      0.00       10     0.00     0.00
Gem::Specification#overwrite_accessor
   0.00     5.84      0.00        1     0.00     0.00  Hash#default
   0.00     5.84      0.00        1     0.00     0.00  Module#extended
   0.00     5.84      0.00        2     0.00     0.00  Array#collect
   0.00     5.84      0.00        2     0.00     0.00
Module#module_function
   0.00     5.84      0.00        1     0.00    10.00
Forwardable.def_delegators
   0.00     5.84      0.00        1     0.00     0.00  Fixnum#to_s
   0.00     5.84      0.00        1     0.00     0.00  IO#write
   0.00     5.84      0.00       14     0.00     0.00  Regexp#to_s
   0.00     5.84      0.00        1     0.00     0.00
Gem::Version#initialize
   0.00     5.84      0.00        1     0.00     0.00  Kernel.extend
   0.00     5.84      0.00        1     0.00  5840.00  #toplevel

real    0m7.190s
user    0m5.859s
sys     0m0.460s

zenspider profiler:
./lib/zenprofile.rb:1:in `require': no such file to load -- inline
(LoadError)
         from ./lib/zenprofile.rb:1

real    0m0.030s
user    0m0.010s
sys     0m0.009s
leavengood (Guest)
on 2005-11-30 18:35
(Received via mailing list)
On 11/30/05, Gavin K. <removed_email_address@domain.invalid> wrote:
>
> zenspider profiler:
> ./lib/zenprofile.rb:1:in `require': no such file to load -- inline
> (LoadError)
>          from ./lib/zenprofile.rb:1
>
> real    0m0.030s
> user    0m0.010s
> sys     0m0.009s

You need RubyInline:

   gem install rubyinline

I'm not sure why this isn't a dependency of ZenHacks.

Ryan
gavin (Guest)
on 2005-11-30 18:59
(Received via mailing list)
I should have mentioned - RubyInline was installed by the gem - it was
a dependency. Looks like something is borked with my rubygems require
or something. I had just installed 1.8.4, so that's likely related.
This topic is locked and can not be replied to.