Created
October 31, 2016 13:34
-
-
Save marianposaceanu/f4742013e6bc9d603050686efc893134 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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