summaryrefslogtreecommitdiff
path: root/lib/ffi_yajl/benchmark/parse_profile.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-06-20 15:37:38 -0700
committerTim Smith <tsmith@chef.io>2017-06-20 15:37:38 -0700
commit672fce3aed2d68e7362dc5cfeb72df78f30eb3a2 (patch)
tree76598d0c31493ca6fa8a8353402136cf8003b997 /lib/ffi_yajl/benchmark/parse_profile.rb
parentf3f92275f804f4c6cf93ee054af7d4ba3e50030a (diff)
downloadffi-yajl-672fce3aed2d68e7362dc5cfeb72df78f30eb3a2.tar.gz
Switch from reek/rubocop to chefstyle
Reek doesn't work with modern Rake Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/ffi_yajl/benchmark/parse_profile.rb')
-rw-r--r--lib/ffi_yajl/benchmark/parse_profile.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ffi_yajl/benchmark/parse_profile.rb b/lib/ffi_yajl/benchmark/parse_profile.rb
index 6ef00ac..4b396b4 100644
--- a/lib/ffi_yajl/benchmark/parse_profile.rb
+++ b/lib/ffi_yajl/benchmark/parse_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 if defined?(PerfTools)
filename = File.expand_path(File.join(File.dirname(__FILE__), "subjects", "ohai.json"))
- json = File.new(filename, 'r').read
+ json = File.new(filename, "r").read
times = 1000
puts "Starting profiling encoding #{filename} #{times} times\n\n"