Skip to content

Instantly share code, notes, and snippets.

@marianposaceanu
Created October 31, 2016 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marianposaceanu/f4742013e6bc9d603050686efc893134 to your computer and use it in GitHub Desktop.
Save marianposaceanu/f4742013e6bc9d603050686efc893134 to your computer and use it in GitHub Desktop.
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