remove the require rubygems from test, so that we can have more control over which version is being tested
This commit is contained in:
parent
aab6964387
commit
0fa6f9f30f
@ -1,4 +1,3 @@
|
|||||||
require 'rubygems'
|
|
||||||
require 'mysqlplus'
|
require 'mysqlplus'
|
||||||
require 'benchmark'
|
require 'benchmark'
|
||||||
|
|
||||||
@ -38,4 +37,4 @@ Benchmark.bmbm do |x|
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
puts $gc_stats.join( ' | ' )
|
puts $gc_stats.join( ' | ' )
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
# note that we load all the rows first, then run .all_hashes on the result [to see more easily the effect of all hashes]
|
# note that we load all the rows first, then run .all_hashes on the result [to see more easily the effect of all hashes]
|
||||||
# on my machine and a 200_000 row table, it took 3.38s versus 3.65s for the old .each_hash way [note also that .each_hash is
|
# on my machine and a 200_000 row table, it took 3.38s versus 3.65s for the old .each_hash way [note also that .each_hash is
|
||||||
# almost as fast, now, as .all_hashes--they've both been optimized]
|
# almost as fast, now, as .all_hashes--they've both been optimized]
|
||||||
require 'rubygems'
|
|
||||||
require 'mysqlplus'
|
require 'mysqlplus'
|
||||||
|
|
||||||
use_the_all_hashes_method = true
|
use_the_all_hashes_method = true
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
require 'rubygems'
|
|
||||||
require 'mysqlplus'
|
require 'mysqlplus'
|
||||||
begin
|
begin
|
||||||
Mysql.real_connect('fakehost','root', '', 'local_leadgen_dev')
|
Mysql.real_connect('fakehost','root', '', 'local_leadgen_dev')
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
require 'rubygems'
|
|
||||||
require 'mysqlplus'
|
require 'mysqlplus'
|
||||||
|
|
||||||
class MysqlTest
|
class MysqlTest
|
||||||
@ -196,4 +195,4 @@ class ThreadedMysqlTest < MysqlTest
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
require 'rubygems'
|
|
||||||
require 'mysqlplus'
|
require 'mysqlplus'
|
||||||
a = Mysql.real_connect('localhost','root')
|
a = Mysql.real_connect('localhost','root')
|
||||||
100.times { a.query("select sleep(0)") }
|
100.times { a.query("select sleep(0)") }
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
# from .82s to .62s
|
# from .82s to .62s
|
||||||
# you can experiment with it by changing the query here to be a long one, and toggling the do_the_use_query_optimization variable
|
# you can experiment with it by changing the query here to be a long one, and toggling the do_the_use_query_optimization variable
|
||||||
# this also has the interesting property of 'freeing' Ruby to do thread changes mid-query.
|
# this also has the interesting property of 'freeing' Ruby to do thread changes mid-query.
|
||||||
require 'rubygems'
|
|
||||||
require 'mysqlplus'
|
require 'mysqlplus'
|
||||||
|
|
||||||
do_the_use_query_optimization = true
|
do_the_use_query_optimization = true
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
require 'mysqlplus'
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'sequel'
|
require 'sequel'
|
||||||
|
|
||||||
require 'mysqlplus'
|
|
||||||
class Mysql
|
class Mysql
|
||||||
unless method_defined? :sync_query
|
unless method_defined? :sync_query
|
||||||
alias :sync_query :query
|
alias :sync_query :query
|
||||||
@ -21,4 +21,4 @@ start = Time.now
|
|||||||
end
|
end
|
||||||
end.map{|t| t.join }
|
end.map{|t| t.join }
|
||||||
|
|
||||||
p (Time.now - start)
|
p (Time.now - start)
|
||||||
|
Loading…
Reference in New Issue
Block a user