Skip to content

Instantly share code, notes, and snippets.

@jphpsf
Created January 15, 2011 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jphpsf/780747 to your computer and use it in GitHub Desktop.
Save jphpsf/780747 to your computer and use it in GitHub Desktop.
Require performance issue
$ ruby-prof -m 1 cucumber
.... cucumber execution ....
Thread ID: 79705620
Total: 18.210000
%self total self wait child calls name
33.85 17.18 6.16 0.00 17.07 2011 Kernel#require
4.40 17.69 0.80 0.00 17.67 39899 Array#each
3.57 1.12 0.65 0.00 0.60 1299 Module#class_eval
3.08 1.40 0.56 0.00 1.05 12596 Array#map
2.75 1.71 0.50 0.00 1.21 569 Kernel#eval
2.14 0.39 0.39 0.00 0.00 2192 Kernel#caller
2.03 0.38 0.37 0.00 0.01 200267 Hash#default
1.81 0.50 0.33 0.00 0.17 8702 Integer#upto
1.59 0.29 0.29 0.00 0.00 166702 Symbol#to_s
1.43 0.26 0.26 0.00 0.00 182648 Module#===
1.04 0.36 0.19 0.00 0.17 78975 Gem::Version#segments
1.04 0.75 0.19 0.00 0.56 6 AbstractController::ViewPaths::ClassMethods#view_paths=
$> gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2010-07-02 patchlevel -1) [i486-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.9.2/
- RUBY EXECUTABLE: /usr/bin/ruby1.9.2
- EXECUTABLE DIRECTORY: /var/lib/gems/1.9.2/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /var/lib/gems/1.9.2/
- /home/jp/.gem/ruby/1.9.2
- /var/lib/gems/1.9.2
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
$ irb
irb(main):001:0> Gem.path
=> ["/home/jp/.gem/ruby/1.9.2", "/usr/lib/ruby/gems/1.9.2", "/var/lib/gems/1.9.2/"]
irb(main):002:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment