activerecord-import/benchmarks/boot.rb
Zach Dennis 5c287f1042 Added back in basic benchmark support. To run:
ruby benchmark/benchmark.rb --adapter mysql --num 1000
  ruby benchmark/benchmark.rb --adapter mysql --num 1000 --to-csv /tmp/results.csv
  ruby benchmark/benchmark.rb --adapter mysql --num 1000 --to-html /tmp/results.html
2010-04-08 23:12:28 -04:00

19 lines
500 B
Ruby

begin ; require 'rubygems' ; rescue LoadError ; end
require 'active_record' # ActiveRecord loads the Benchmark library automatically
require 'active_record/version'
require 'fastercsv'
require 'fileutils'
require 'logger'
# Files are loaded alphabetically. If this is a problem then manually specify the files
# that need to be loaded here.
Dir[ File.join( File.dirname( __FILE__ ), 'lib', '*.rb' ) ].sort.each{ |f| require f }
ActiveRecord::Base.logger = Logger.new STDOUT