Rakefile in benchmark_driver-0.3.0 vs Rakefile in benchmark_driver-0.4.0
- old
+ new
@@ -1,15 +1,22 @@
require 'bundler/gem_tasks'
+require 'shellwords'
-desc 'Run benchmarks in benchmarks'
-task :benchmarks do
- require 'bundler'
- require 'shellwords'
+task :ruby_examples do
+ Dir.glob(File.expand_path('./examples/*.rb', __dir__)).sort.each do |file|
+ Bundler.with_clean_env do
+ sh ['time', 'bundle', 'exec', 'ruby', file].shelljoin
+ end
+ puts
+ end
+end
- Dir.glob(File.expand_path('./benchmarks/**/*.yml', __dir__)).sort.each do |path|
+task :yaml_examples do
+ Dir.glob(File.expand_path('./examples/yaml/*.yml', __dir__)).sort.each do |file|
Bundler.with_clean_env do
- sh [File.expand_path('./exe/benchmark-driver', __dir__), path].shelljoin
+ sh ['time', 'bundle', 'exec', 'exe/benchmark-driver', file].shelljoin
end
+ puts
end
end
-task default: :benchmarks
+task default: [:ruby_examples, :yaml_examples]