Skip to content
This repository
tree: 3d94dc3984
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 20 lines (16 sloc) 0.38 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
require 'benchmark'

TIMES = (ARGV[0] || 3).to_i
Benchmark.bm(30) {|bm|
  TIMES.times {
    bm.report("require 'time'") { 10_000.times { require 'time' } }
  }
}

puts "Now with rubygems and activerecord"
require 'rubygems'
gem 'activerecord'
require 'activerecord'

Benchmark.bm(30) {|bm|
  TIMES.times {
    bm.report("require 'time'") { 10_000.times { require 'time' } }
  }
}
Something went wrong with that request. Please try again.