From cf4cecb41799870e62933d2edf335b7af22d612d Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Wed, 30 May 2012 13:54:53 -0400 Subject: [PATCH] minor: remove perftools --- Gemfile | 3 --- bench/profile_array.rb | 17 ++++++++--------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 55c1601..31c9152 100644 --- a/Gemfile +++ b/Gemfile @@ -26,6 +26,3 @@ group :development, :test do gem "jruby-openssl" end end - -gem "perftools.rb", :group => :development unless RUBY_PLATFORM =~ /java/ - diff --git a/bench/profile_array.rb b/bench/profile_array.rb index 3f20565..fa62533 100644 --- a/bench/profile_array.rb +++ b/bench/profile_array.rb @@ -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