Sha256: 2775d1b0fd925c145b28e1fd78471f3e8dd0faeb675e0e98a2e72b6d2dc17fad
Contents?: true
Size: 915 Bytes
Versions: 1
Compression:
Stored size: 915 Bytes
Contents
#!/usr/bin/env ruby $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'mach5-tools' require 'thor' class App < Thor desc "benchmark", "Run benchmarks" method_option :all, :type => :boolean, :aliases => "-a", :desc => "Run all benchmarks even if there is already a result" method_option :list, :type => :boolean, :aliases => "-l", :desc => "List all available benchmarks" method_option :only, :type => :array, :aliases => "-o", :desc => "Run only the specified benchmarks" def benchmark runner = Mach5::Runner.new(eval(File.open("Mach5file").readlines.join)) if options.list runner.list_benchmarks.each do |benchmark| puts benchmark end elsif options.only runner.benchmark(only: options.only) else runner.benchmark(all: options.all) end end default_task :benchmark end App.start
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mach5-tools-0.1.0 | bin/mach5 |