diff options
Diffstat (limited to 'lib/ffi_yajl/benchmark/encode_profile.rb')
-rw-r--r-- | lib/ffi_yajl/benchmark/encode_profile.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ffi_yajl/benchmark/encode_profile.rb b/lib/ffi_yajl/benchmark/encode_profile.rb index 36b92c7..468f88b 100644 --- a/lib/ffi_yajl/benchmark/encode_profile.rb +++ b/lib/ffi_yajl/benchmark/encode_profile.rb @@ -1,15 +1,15 @@ # Portions Originally Copyright (c) 2008-2011 Brian Lopez - http://github.com/brianmario # See MIT-LICENSE -require 'rubygems' -require 'ffi_yajl' +require "rubygems" +require "ffi_yajl" begin - require 'perftools' + require "perftools" rescue LoadError puts "INFO: perftools.rb gem not installed" end -ENV['CPUPROFILE_FREQUENCY'] = "4000" +ENV["CPUPROFILE_FREQUENCY"] = "4000" module FFI_Yajl class Benchmark @@ -18,7 +18,7 @@ module FFI_Yajl return unless defined?(PerfTools) filename = File.expand_path(File.join(File.dirname(__FILE__), "subjects", "ohai.json")) - hash = File.open(filename, 'rb') { |f| FFI_Yajl::Parser.parse(f.read) } + hash = File.open(filename, "rb") { |f| FFI_Yajl::Parser.parse(f.read) } times = 1000 puts "Starting profiling encoding #{filename} #{times} times\n\n" |