Permalink
808c04b Sep 27, 2015
@zamith @qrush
36 lines (27 sloc) 1.3 KB
require 'benchmark/ips'
Benchmark.ips do |bench|
bench.report("running m on a file that doesn't exist") do
`ruby -Ilib ./bin/m failwhale 2>/dev/null`
end
bench.report("running m on an empty file") do
`ruby -Ilib ./bin/m test/examples/empty_example_test.rb 2>/dev/null`
end
bench.report("running m on an entire file with minitest4") do
`appraisal minitest4 ruby -Ilib ./bin/m test/examples/minitest_4_example_test.rb 2>/dev/null`
end
bench.report("running m on an entire file with minitest5") do
`appraisal minitest5 ruby -Ilib ./bin/m test/examples/minitest_5_example_test.rb 2>/dev/null`
end
bench.report("running m on an entire file with test-unit gem") do
`appraisal test_unit_gem ruby -Ilib ./bin/m test/examples/test_unit_example_test.rb 2>/dev/null`
end
bench.report("running m on a specific test with minitest4") do
`appraisal minitest4 ruby -Ilib ./bin/m test/examples/minitest_4_example_test.rb:19 2>/dev/null`
end
bench.report("running m on a specific test with minitest5") do
`appraisal minitest5 ruby -Ilib ./bin/m test/examples/minitest_5_example_test.rb:19 2>/dev/null`
end
bench.report("running m on a specific test with test-unit gem") do
`appraisal test_unit_gem ruby -Ilib ./bin/m test/examples/test_unit_example_test.rb:15 2>/dev/null`
end
end