summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2013-11-18 22:48:44 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2013-11-18 22:48:44 -0800
commitcd49dd7a175b0acae2700b5e8808b70f03e39a8f (patch)
tree81ed93e4f0c967c12887033609fc0230a351a192 /bin
parented1b6042be66637e8f5b543c6876d1302af2fc2f (diff)
downloadffi-yajl-cd49dd7a175b0acae2700b5e8808b70f03e39a8f.tar.gz
get the c extensions compiled in
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ffi-yajl-bench11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/ffi-yajl-bench b/bin/ffi-yajl-bench
index 13725a0..410c5e0 100755
--- a/bin/ffi-yajl-bench
+++ b/bin/ffi-yajl-bench
@@ -14,10 +14,21 @@ optparse = OptionParser.new do |o|
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::EncodeProfile.new().run()
else