minor: remove perftools

This commit is contained in:
Tyler Brock 2012-05-30 13:54:53 -04:00
parent b7d34071b5
commit cf4cecb417
2 changed files with 8 additions and 12 deletions

View File

@ -26,6 +26,3 @@ group :development, :test do
gem "jruby-openssl"
end
end
gem "perftools.rb", :group => :development unless RUBY_PLATFORM =~ /java/

View File

@ -22,7 +22,6 @@ require 'rubygems'
require 'mongo'
require 'benchmark'
require 'ruby-prof'
require 'perftools'
def array_size_fixnum(base, power)
n = base ** power
@ -65,14 +64,14 @@ def ruby_prof(iterations)
printer.print(STDOUT, {})
end
def perftools(iterations)
profile_file_name = '/tmp/profile_array.perftools'
PerfTools::CpuProfiler.start(profile_file_name) do
iterations.times { yield }
end
cmd = "pprof.rb --ignore=IO --text \"#{profile_file_name}\""
system(cmd)
end
#def perftools(iterations)
# profile_file_name = '/tmp/profile_array.perftools'
# PerfTools::CpuProfiler.start(profile_file_name) do
# iterations.times { yield }
# end
# cmd = "pprof.rb --ignore=IO --text \"#{profile_file_name}\""
# system(cmd)
#end
conn = Mongo::Connection.new