minor: remove perftools
This commit is contained in:
parent
b7d34071b5
commit
cf4cecb417
3
Gemfile
3
Gemfile
@ -26,6 +26,3 @@ group :development, :test do
|
|||||||
gem "jruby-openssl"
|
gem "jruby-openssl"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
gem "perftools.rb", :group => :development unless RUBY_PLATFORM =~ /java/
|
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@ require 'rubygems'
|
|||||||
require 'mongo'
|
require 'mongo'
|
||||||
require 'benchmark'
|
require 'benchmark'
|
||||||
require 'ruby-prof'
|
require 'ruby-prof'
|
||||||
require 'perftools'
|
|
||||||
|
|
||||||
def array_size_fixnum(base, power)
|
def array_size_fixnum(base, power)
|
||||||
n = base ** power
|
n = base ** power
|
||||||
@ -65,14 +64,14 @@ def ruby_prof(iterations)
|
|||||||
printer.print(STDOUT, {})
|
printer.print(STDOUT, {})
|
||||||
end
|
end
|
||||||
|
|
||||||
def perftools(iterations)
|
#def perftools(iterations)
|
||||||
profile_file_name = '/tmp/profile_array.perftools'
|
# profile_file_name = '/tmp/profile_array.perftools'
|
||||||
PerfTools::CpuProfiler.start(profile_file_name) do
|
# PerfTools::CpuProfiler.start(profile_file_name) do
|
||||||
iterations.times { yield }
|
# iterations.times { yield }
|
||||||
end
|
# end
|
||||||
cmd = "pprof.rb --ignore=IO --text \"#{profile_file_name}\""
|
# cmd = "pprof.rb --ignore=IO --text \"#{profile_file_name}\""
|
||||||
system(cmd)
|
# system(cmd)
|
||||||
end
|
#end
|
||||||
|
|
||||||
conn = Mongo::Connection.new
|
conn = Mongo::Connection.new
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user