Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
require 'benchmark'
timings = {}
measure_feature = -> feature_path {
time = Benchmark.measure {
puts "Benchmarking feature #{feature_path}."
cmd = `cucumber --format json -r features '#{feature_path}'`
}
time_in_minutes = (time.real/60).round(2)
print "Time: #{time_in_minutes} minutes."
timings[feature_path] = time_in_minutes
}
# Get the list of features
feature_files = Dir.glob('./features/**/*.feature')
feature_files.each(&measure_feature)
puts timings.inspect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment