bin/mach5 in mach5-tools-0.1.0 vs bin/mach5 in mach5-tools-0.2.0

- old
+ new

@@ -21,9 +21,26 @@ else runner.benchmark(all: options.all) end end + desc "chart", "Generate charts" + method_option :all, :type => :boolean, :aliases => "-a", :desc => "Generates all benchmarks even if it was already generated" + method_option :list, :type => :boolean, :aliases => "-l", :desc => "List all available charts" + method_option :only, :type => :array, :aliases => "-o", :desc => "Generates only the specified charts" + def chart + runner = Mach5::Runner.new(eval(File.open("Mach5file").readlines.join)) + if options.list + runner.list_charts.each do |chart| + puts chart + end + elsif options.only + runner.chart(only: options.only) + else + runner.chart(all: options.all) + end + end + default_task :benchmark end App.start \ No newline at end of file