Sha256: acb57a42cfa1a0d20ebf03c28dbedb8d2f6a9cd226e459f05b4e011f28be500d
Contents?: true
Size: 782 Bytes
Versions: 24
Compression:
Stored size: 782 Bytes
Contents
#!/usr/bin/env ruby $: << File.expand_path(File.join(File.dirname( File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__ ), "../lib")) require 'optparse' require 'ffi_yajl/benchmark' opts = {} optparse = OptionParser.new do |o| o.banner = "Usage: ffi-yajl-bench" opts[:profile] = false o.on( '-p', '--profile', 'Run perftools.rb profiling' ) do opts[:profile] = true end o.on( '-F', '--ffi', 'Force using FFI' ) do opts[:ffi] = true end o.on( '-E', '--ext', 'Force using C ext' ) do opts[:ext] = true end end optparse.parse! ENV['FORCE_FFI_YAJL'] = 'ffi' if opts[:ffi] ENV['FORCE_FFI_YAJL'] = 'ext' if opts[:ext] if opts[:profile] FFI_Yajl::Benchmark::ParseProfileRubyProf.new().run() else FFI_Yajl::Benchmark::Parse.new().run() end
Version data entries
24 entries across 24 versions & 1 rubygems