Sha256: 26aa5a8853ebb699f8ac7446e077216a459e68dc44d0e2e19a54f0ee55a2ad53
Contents?: true
Size: 860 Bytes
Versions: 3
Compression:
Stored size: 860 Bytes
Contents
#!/usr/bin/env ruby dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir) require 'wbench' require 'optparse' options = {}.tap do |options| OptionParser.new do |opts| opts.version = WBench::VERSION opts.banner = 'Usage: wbench url [options]' opts.separator "" opts.separator "Options:" opts.on("-l", "--loops [LOOPS]", Integer, "Set number of loops (default: #{WBench::DEFAULT_LOOPS})") do |loops| options[:loops] = loops end opts.on("-b", "--browser [BROWSER]", "Set the web browser, chrome and firefox are available (default: #{WBench::DEFAULT_BROWSER})") do |browser| options[:browser] = browser end end.parse! end if url = ARGV[0] puts WBench::Benchmark.run(url, options) else abort 'Please provide a URL to benchmark' end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wbench-0.2.3 | bin/wbench |
wbench-0.2.2 | bin/wbench |
wbench-0.2.1 | bin/wbench |