Commit f98e1124 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'sh-add-ci-job-name-rspec-profiling' into 'master'

Add CI_JOB_NAME to rspec_profiling output filename

See merge request gitlab-org/gitlab!22195
parents df46ecfd 8c82e749
......@@ -60,6 +60,9 @@ RspecProfiling.configure do |config|
RspecProfiling::VCS::Git.prepend(RspecProfilingExt::Git)
RspecProfiling::Run.prepend(RspecProfilingExt::Run)
config.collector = RspecProfilingExt::Collectors::CSVWithTimestamps
config.csv_path = -> { "rspec_profiling/#{Time.now.to_i}-#{SecureRandom.hex(8)}-rspec-data.csv" }
config.csv_path = -> do
prefix = "#{ENV['CI_JOB_NAME']}-".tr(' ', '-') if ENV['CI_JOB_NAME']
"rspec_profiling/#{prefix}#{Time.now.to_i}-#{SecureRandom.hex(8)}-rspec-data.csv"
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment