Skip to content

Instantly share code, notes, and snippets.

@nicksieger
Created August 19, 2008 16:10
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 nicksieger/6197 to your computer and use it in GitHub Desktop.
Save nicksieger/6197 to your computer and use it in GitHub Desktop.
jruby --debug ./script/performance/profiler "Project.alphabetical.publicly_visible" 5000 2> jruby-projects-prof.txt
./script/performance/profiler "Project.alphabetical.publicly_visible" 5000 2> ruby-projects-prof.txt
Loading Rails...
Using the standard Ruby profiler.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
8.24 2.58 2.58 10000 0.26 0.56 Set#merge
8.20 5.16 2.57 10000 0.26 0.87 Set#initialize
7.91 7.64 2.48 10000 0.25 1.92 ActiveRecord::NamedScope::Scope#initialize
7.17 9.89 2.25 10000 0.22 1.53 ActiveSupport::CoreExtensions::Hash::Except.except
7.10 12.12 2.23 15000 0.15 0.22 Class#read_inheritable_attribute
6.21 14.06 1.95 10000 0.19 2.14 Proc#call
6.07 15.97 1.90 10000 0.19 0.41 Hash#reject
5.03 17.55 1.58 5000 0.32 3.63 ActiveRecord::NamedScope::Scope#method_missing
4.77 19.04 1.50 35000 0.04 0.05 Hash#[]
4.59 20.48 1.44 15000 0.10 0.32 ActiveRecord::NamedScope::ClassMethods.scopes
4.57 21.92 1.43 15000 0.10 0.12 Set#include?
3.81 23.11 1.20 10000 0.12 0.15 Set#add
3.35 24.16 1.05 10000 0.11 0.50 ActiveRecord::NamedScope::Scope#scopes
3.17 25.16 0.99 1 994.00 23938.00 Integer#times
3.11 26.13 0.97 10003 0.10 0.24 Array#each
2.68 26.97 0.84 10000 0.08 0.40 Kernel.__send__
2.18 27.65 0.68 15000 0.05 0.05 Class#inheritable_attributes
1.82 28.22 0.57 20000 0.03 0.03 Kernel.is_a?
1.77 28.78 0.55 20000 0.03 0.03 Hash#include?
1.01 29.10 0.32 10000 0.03 0.03 Hash#initialize_copy
0.97 29.40 0.30 10000 0.03 0.03 Kernel.respond_to?
0.93 29.69 0.29 10000 0.03 0.03 Module#===
0.93 29.98 0.29 10000 0.03 0.03 Kernel.block_given?
0.93 30.28 0.29 1 292.00 31360.00 Object#profile_me
0.88 30.55 0.28 10000 0.03 0.03 Hash#initialize
0.88 30.83 0.28 10000 0.03 0.03 Kernel.nil?
0.87 31.10 0.27 10000 0.03 0.03 Hash#default
0.82 31.36 0.26 10000 0.03 0.03 Hash#[]=
0.00 31.36 0.00 3 0.33 0.33 Fixnum#to_f
0.00 31.36 0.00 2 0.00 0.50 Kernel.sleep
0.00 31.36 0.00 1 0.00 31362.00 #toplevel
Loading Rails...
Using the standard Ruby profiler.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
9.73 1.97 1.97 10000 0.20 0.51 Set#merge
6.86 3.36 1.39 10000 0.14 1.46 Proc#call
6.32 4.64 1.28 15000 0.09 0.16 Class#read_inheritable_attribute
6.07 5.87 1.23 35000 0.04 0.04 Hash#[]
5.68 7.02 1.15 30000 0.04 0.69 Class#new
5.63 8.16 1.14 10000 0.11 0.68 Set#initialize
5.63 9.30 1.14 10000 0.11 1.05 ActiveSupport::CoreExtensions::Hash::Except.except
5.38 10.39 1.09 10000 0.11 1.25 ActiveRecord::NamedScope::Scope#initialize
5.19 11.44 1.05 10000 0.10 0.17 Set#add
4.94 12.44 1.00 10002 0.10 0.27 Array#each
4.25 13.30 0.86 10000 0.09 0.20 Hash#reject
4.00 14.11 0.81 5000 0.16 2.23 ActiveRecord::NamedScope::Scope#method_missing
3.46 14.81 0.70 10000 0.07 0.07 Hash#[]=
3.36 15.49 0.68 15000 0.05 0.20 ActiveRecord::NamedScope::ClassMethods.scopes
3.21 16.14 0.65 15000 0.04 0.04 Class#inheritable_attributes
3.06 16.76 0.62 15000 0.04 0.06 Set#include?
2.72 17.31 0.55 5000 0.11 1.78 Project#alphabetical
1.73 17.66 0.35 20000 0.02 0.02 Kernel.is_a?
1.68 18.00 0.34 20000 0.02 0.02 Hash#include?
1.68 18.34 0.34 10000 0.03 0.30 ActiveRecord::NamedScope::Scope#scopes
1.33 18.61 0.27 10000 0.03 0.27 Kernel.__send__
1.28 18.87 0.26 10000 0.03 0.03 Module#===
1.23 19.12 0.25 10000 0.02 0.02 Kernel.block_given?
1.19 19.36 0.24 10000 0.02 0.02 Hash#default
1.14 19.59 0.23 10000 0.02 0.02 Kernel.respond_to?
0.94 19.78 0.19 10000 0.02 0.02 Hash#initialize_copy
0.79 19.94 0.16 10000 0.02 0.02 Hash#initialize
0.44 20.03 0.09 10000 0.01 0.01 Kernel.nil?
0.44 20.12 0.09 1 90.00 20250.00 Object#profile_me
0.40 20.20 0.08 1 80.00 9230.00 Kernel.sleep
0.25 20.25 0.05 1 50.00 3000.00 Integer#times
0.00 20.25 0.00 1 0.00 20250.00 #toplevel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment