headius (owner)

Revisions

gist: 211313 Download_button fork
public
Public Clone URL: git://gist.github.com/211313.git
Embed All Files: show embed
diff #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/minimal.rb b/minimal.rb
index 97247b0..183e7f9 100644
--- a/minimal.rb
+++ b/minimal.rb
@@ -133,6 +133,7 @@ end
 ActionController::Base.use_accept_header = false
 
 unless ENV["PROFILE"]
+5.times {
   if ActionPack::VERSION::MAJOR > 2
     Runner.run(:overhead, 1, false)
   end
@@ -156,6 +157,7 @@ unless ENV["PROFILE"]
   Runner.run(:hundred_partials, N, true)
   Runner.run(:collection_of_100, N, true)
   end
+}
 else
   Runner.run(ENV["PROFILE"].to_sym, 1, false)
   require "ruby-prof"
@@ -164,4 +166,4 @@ else
   result = RubyProf.stop
   printer = RubyProf::CallStackPrinter.new(result)
   printer.print(File.open("output.html", "w"))
-end
\ No newline at end of file
+end
 
jruby 5th iteration #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
overhead
========
77 ms / 1000 req = 77.0 usec/req
 
index
=====
187 ms / 1000 req = 188.0 usec/req
 
show_template
=============
228 ms / 1000 req = 229.0 usec/req
 
partial
=======
186 ms / 1000 req = 187.0 usec/req
 
ten_partials
============
493 ms / 1000 req = 494.0 usec/req
 
collection_of_10
================
368 ms / 1000 req = 369.0 usec/req
 
hundred_partials
================
2858 ms / 1000 req = 2859.0 usec/req
 
collection_of_100
=================
2081 ms / 1000 req = 2081.0 usec/req
 
 
 
 
MRI #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
~/projects/rails/actionpack ➔ ruby -I ../../jruby/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/ rails-simple-benches/minimal.rb
overhead
========
108 ms / 1000 req = 108.8 usec/req
 
index
=====
183 ms / 1000 req = 184.0 usec/req
 
show_template
=============
241 ms / 1000 req = 242.0 usec/req
 
partial
=======
212 ms / 1000 req = 212.7 usec/req
 
ten_partials
============
882 ms / 1000 req = 882.7 usec/req
 
collection_of_10
================
454 ms / 1000 req = 454.5 usec/req
 
hundred_partials
================
6257 ms / 1000 req = 6257.3 usec/req
 
collection_of_100
=================
2312 ms / 1000 req = 2312.2 usec/req