tasks/spec.rake in ri_cal-0.5.3 vs tasks/spec.rake in ri_cal-0.6.0
- old
+ new
@@ -45,6 +45,33 @@
t.rcov = true
t.rcov_dir = "coverage"
t.rcov_opts = ['--exclude', 'spec']
end
end
+
+namespace :performance do
+ desc 'Run all benchmarks'
+ task :benchmark do
+ bench_script = File.join(File.dirname(__FILE__), '..', '/script', 'benchmark_subject')
+ bench_file = File.join(File.dirname(__FILE__), '..', '/performance_data', 'benchmarks.out')
+ cat = ">"
+ FileList[File.join(File.dirname(__FILE__), '..', '/performance', '*')].each do |f|
+ cmd = "#{bench_script} #{File.basename(f)} #{cat} #{bench_file}"
+ puts cmd
+ `#{cmd}`
+ cat = '>>'
+ end
+ end
+
+ desc 'Run all profiles'
+ task :profile do
+ bench_script = File.join(File.dirname(__FILE__), '..', '/script', 'profile_subject')
+ FileList[File.join(File.dirname(__FILE__), '..', '/performance', '*')].each do |f|
+ cmd = "#{bench_script} #{File.basename(f)}"
+ puts cmd
+ `#{cmd}`
+ end
+ end
+
+end
+
\ No newline at end of file