1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
begin
require "standard/rake"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
task default: [:spec, "standard:fix"]
rescue LoadError
# no standard/rspec available
end
# Benchmark tasks
namespace :benchmark do
desc "Run all benchmarks"
task :all do
%w[svg png html ansi format_comparison].each do |format|
Rake::Task["benchmark:#{format}"].invoke
end
end
desc "Run SVG export benchmarks"
task :svg do
ruby "benchmark/svg_export.rb"
end
desc "Run PNG export benchmarks"
task :png do
ruby "benchmark/png_export.rb"
end
desc "Run HTML export benchmarks"
task :html do
ruby "benchmark/html_export.rb"
end
desc "Run ANSI export benchmarks"
task :ansi do
ruby "benchmark/ansi_export.rb"
end
desc "Run format comparison benchmarks"
task :format_comparison do
ruby "benchmark/format_comparison.rb"
end
end
|