diff options
| author | Greg Myers <gmyers@gitlab.com> | 2019-08-27 15:51:04 +0000 |
|---|---|---|
| committer | Greg Myers <gmyers@gitlab.com> | 2019-08-27 15:51:04 +0000 |
| commit | 51a0166af2c532aa7a0d04bb503b43499be97033 (patch) | |
| tree | 9ebd74e8518d573fe4860763ddb41146dab1f453 /scripts/gather-test-memory-data | |
| parent | f706677357fcdf9cd870d098379788543ea71058 (diff) | |
| parent | 27c222d16ccb666878c7ac558f484efa56f77f37 (diff) | |
| download | gitlab-ce-api-curl-quote-url-docs.tar.gz | |
Merge branch 'master' into 'api-curl-quote-url-docs'api-curl-quote-url-docs
# Conflicts:
# doc/api/events.md
Diffstat (limited to 'scripts/gather-test-memory-data')
| -rwxr-xr-x | scripts/gather-test-memory-data | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/gather-test-memory-data b/scripts/gather-test-memory-data new file mode 100755 index 00000000000..9992a83e6a6 --- /dev/null +++ b/scripts/gather-test-memory-data @@ -0,0 +1,21 @@ +#!/usr/bin/env ruby + +require 'csv' + +def join_csv_files(output_path, input_paths) + return if input_paths.empty? + + input_csvs = input_paths.map do |input_path| + CSV.read(input_path, headers: true) + end + + CSV.open(output_path, "w", headers: input_csvs.first.headers, write_headers: true) do |output_csv| + input_csvs.each do |input_csv| + input_csv.each do |line| + output_csv << line + end + end + end +end + +join_csv_files('tmp/memory_test/report.csv', Dir['tmp/memory_test/*.csv'].sort) |
