bin/standard_benchmark in mongodb-mongo-0.12 vs bin/standard_benchmark in mongodb-mongo-0.13

- old
+ new

@@ -3,11 +3,11 @@ # Note: Ruby 1.9 is faster than 1.8, as expected. $LOAD_PATH[0,0] = File.join(File.dirname(__FILE__), '..', 'lib') require 'mongo' -include XGen::Mongo::Driver +include Mongo TRIALS = 2 PER_TRIAL = 5000 BATCH_SIZE = 100 @@ -48,12 +48,12 @@ n.times { |i| proc.call(coll, object, i) } report(str, Time.new.to_f - t0.to_f) end host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost' -port = ENV['MONGO_RUBY_DRIVER_PORT'] || XGen::Mongo::Driver::Mongo::DEFAULT_PORT +port = ENV['MONGO_RUBY_DRIVER_PORT'] || Connection::DEFAULT_PORT -connection = Mongo.new(host, port) +connection = Connection.new(host, port) connection.drop_database("benchmark") db = connection.db('benchmark') insert = Proc.new { |coll, object, i| object['x'] = i