Permalink
Browse files

Updated to take compilation out of the measurements

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1214 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 9aaea3b commit bd441bb06653c1696ccdce486add6e2d0b8e93d3 @dhh dhh committed Apr 18, 2005
Showing with 6 additions and 0 deletions.
  1. +3 −0 railties/bin/benchmarker
  2. +3 −0 railties/bin/profiler
View
@@ -9,6 +9,9 @@ require File.dirname(__FILE__) + '/../config/environment'
require 'benchmark'
include Benchmark
+# Don't include compilation in the benchmark
+ARGV[1..-1].each { |expression| eval(expression) }
+
bm(6) do |x|
ARGV[1..-1].each_with_index do |expression, idx|
x.report("##{idx + 1}") { ARGV[0].to_i.times { eval(expression) } }
View
@@ -8,6 +8,9 @@ end
require File.dirname(__FILE__) + '/../config/environment'
require "profiler"
+# Don't include compilation in the profile
+eval(ARGV.first)
+
Profiler__::start_profile
(ARGV[1] || 1).to_i.times { eval(ARGV.first) }
Profiler__::stop_profile

0 comments on commit bd441bb

Please sign in to comment.