update benchmark scripts

This commit is contained in:
Brian Lopez 2010-04-21 01:31:46 -07:00
parent d7c146e322
commit efc66b6c06
2 changed files with 3 additions and 4 deletions

View File

@ -4,9 +4,8 @@ $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
require 'rubygems' require 'rubygems'
require 'benchmark' require 'benchmark'
require 'active_record' require 'active_record'
require 'ruby-debug'
number_of = 1 number_of = 10
mysql2_opts = { mysql2_opts = {
:adapter => 'mysql2', :adapter => 'mysql2',
:database => 'test' :database => 'test'

View File

@ -6,9 +6,9 @@ require 'mysql'
require 'mysql2_ext' require 'mysql2_ext'
require 'do_mysql' require 'do_mysql'
number_of = 1 number_of = 100
database = 'test' database = 'test'
sql = "SELECT * FROM mysql2_test" sql = "SELECT * FROM mysql2_test LIMIT 100"
Benchmark.bmbm do |x| Benchmark.bmbm do |x|
mysql2 = Mysql2::Client.new(:host => "localhost", :username => "root") mysql2 = Mysql2::Client.new(:host => "localhost", :username => "root")