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
RSpec.configure do |config| | |
next unless ENV['BENCHMARK'] == '1' | |
benchmarks = [] | |
metadata_keys = %i[ file_path line_number described_class ] | |
info_keys = %i[ type ] + metadata_keys + %i[ full_description ] | |
log_file = Rails.root.join('log', 'rspec_benchmark.csv') | |
config.before(:suite) do | |
CSV.open(log_file, "wb") do |csv| | |
csv << info_keys + %i[ utime stime cutime cstime real] | |
end |
NewerOlder