Sha256: 50e74b2a06bc5b4f1c6009e524931d8ccd1b5c3ef2e3898f46811cbc89d56117

Contents?: true

Size: 524 Bytes

Versions: 176

Compression:

Stored size: 524 Bytes

Contents

if ARGV.empty?
  puts "Usage: ./script/performance/benchmarker [times] 'Person.expensive_way' 'Person.another_expensive_way' ..."
  exit 1
end

begin
  N = Integer(ARGV.first)
  ARGV.shift
rescue ArgumentError
  N = 1
end

require RAILS_ROOT + '/config/environment'
require 'benchmark'
include Benchmark

# Don't include compilation in the benchmark
ARGV.each { |expression| eval(expression) }

bm(6) do |x|
  ARGV.each_with_index do |expression, idx|
    x.report("##{idx + 1}") { N.times { eval(expression) } }
  end
end 

Version data entries

176 entries across 175 versions & 19 rubygems

Version Path
radiantcms-couchrest_model-0.1.9 vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiantcms-couchrest_model-0.1.8 vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiantcms-couchrest_model-0.1.7 vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiantcms-couchrest_model-0.1.6 vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiantcms-couchrest_model-0.1.5 vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiantcms-couchrest_model-0.1.4 vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiantcms-couchrest_model-0.1.3 vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiantcms-couchrest_model-0.1.2 vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiantcms-couchrest_model-0.1.1 vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiantcms-couchrest_model-0.1 vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiant-0.7.2 vendor/rails/railties/lib/commands/performance/benchmarker.rb
rails-2.3.10 lib/commands/performance/benchmarker.rb
rails-2.3.9 lib/commands/performance/benchmarker.rb
rails-2.3.9.pre lib/commands/performance/benchmarker.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/railties/lib/commands/performance/benchmarker.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/railties/lib/commands/performance/benchmarker.rb
webroar-0.4.0 src/admin_panel/vendor/rails/railties/lib/commands/performance/benchmarker.rb
radiant-0.9.1 vendor/rails/railties/lib/commands/performance/benchmarker.rb
rails-2.3.8 lib/commands/performance/benchmarker.rb
rails-2.3.8.pre1 lib/commands/performance/benchmarker.rb