turn off debug symbols again, put back benchmark script
This commit is contained in:
parent
ae5a028189
commit
7e64570770
@ -1,48 +1,36 @@
|
|||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'memprof'
|
require 'benchmark'
|
||||||
# require 'benchmark'
|
require 'mysql'
|
||||||
# require 'mysql'
|
|
||||||
require 'mysql2_ext'
|
require 'mysql2_ext'
|
||||||
|
|
||||||
number_of = 1
|
number_of = 1
|
||||||
database = 'nbb_1_production'
|
database = 'nbb_1_production'
|
||||||
sql = "SELECT * FROM account_transactions"
|
sql = "SELECT * FROM account_transactions"
|
||||||
|
|
||||||
# Benchmark.bmbm do |x|
|
Benchmark.bmbm do |x|
|
||||||
Memprof.start
|
mysql = Mysql.new("localhost", "root")
|
||||||
# mysql = Mysql.new("localhost", "root")
|
mysql.query "USE #{database}"
|
||||||
# mysql.query "USE #{database}"
|
x.report do
|
||||||
# x.report do
|
puts "Mysql"
|
||||||
# puts "Mysql"
|
number_of.times do
|
||||||
# number_of.times do
|
mysql_result = mysql.query sql
|
||||||
# mysql_result = mysql.query sql
|
mysql_result.each_hash do |res|
|
||||||
# number = 0
|
|
||||||
# mysql_result.each_hash do |res|
|
|
||||||
# number += 1
|
|
||||||
# puts res.inspect
|
# puts res.inspect
|
||||||
# end
|
end
|
||||||
# Memprof.stats
|
end
|
||||||
# Memprof.stop
|
end
|
||||||
# puts "Processed #{number} results"
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
|
|
||||||
mysql2 = Mysql2::Client.new
|
mysql2 = Mysql2::Client.new
|
||||||
mysql2.query "USE #{database}"
|
mysql2.query "USE #{database}"
|
||||||
# x.report do
|
x.report do
|
||||||
# puts "Mysql2"
|
puts "Mysql2"
|
||||||
# number_of.times do
|
number_of.times do
|
||||||
mysql2_result = mysql2.query sql
|
mysql2_result = mysql2.query sql
|
||||||
# # number = 0
|
|
||||||
mysql2_result.each(:symbolize_keys => true) do |res|
|
mysql2_result.each(:symbolize_keys => true) do |res|
|
||||||
# # number += 1
|
# puts res.inspect
|
||||||
# # puts res.inspect
|
|
||||||
end
|
end
|
||||||
# # puts "Processed #{number} results"
|
end
|
||||||
# end
|
end
|
||||||
# end
|
end
|
||||||
Memprof.stats
|
|
||||||
Memprof.stop
|
|
||||||
# end
|
|
@ -6,7 +6,7 @@ dir_config('mysql')
|
|||||||
have_header('mysql/mysql.h')
|
have_header('mysql/mysql.h')
|
||||||
|
|
||||||
$CFLAGS << ' -Wall -Wextra -funroll-loops'
|
$CFLAGS << ' -Wall -Wextra -funroll-loops'
|
||||||
$CFLAGS << ' -O0 -ggdb3'
|
# $CFLAGS << ' -O0 -ggdb3'
|
||||||
|
|
||||||
if have_library('mysqlclient')
|
if have_library('mysqlclient')
|
||||||
if RUBY_VERSION =~ /1.9/
|
if RUBY_VERSION =~ /1.9/
|
||||||
|
Loading…
Reference in New Issue
Block a user