summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorAleksei Lipniagov <alipniagov@gitlab.com>2019-06-13 18:14:06 +0300
committerAleksei Lipniagov <alipniagov@gitlab.com>2019-06-19 12:16:44 +0300
commitc3b40ae13184c4e6a1ff3420fb5b4631f7f9a660 (patch)
tree44de5eb2534c48cc82d8b52c9c91004c8ee31199 /.gitlab
parent8716eb0cef94dbbaab5821aa693a9d92fa9f37e8 (diff)
downloadgitlab-ce-c3b40ae13184c4e6a1ff3420fb5b4631f7f9a660.tar.gz
Run static benchmarks from 'derailed_benchmarks'62722-include-derailed-benchmarks-data-to-ci-report
Two static memory benchmarks will be included in our CI pipeline. It will load gems from the Gemfile and check the amount of RAM consumed as well as the number of objects allocated and retained. Aggregated values will be included as 'metrics' into MRs while full reports will be downloadable as job artifacts.
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/ci/memory.gitlab-ci.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/.gitlab/ci/memory.gitlab-ci.yml b/.gitlab/ci/memory.gitlab-ci.yml
new file mode 100644
index 00000000000..50b843df585
--- /dev/null
+++ b/.gitlab/ci/memory.gitlab-ci.yml
@@ -0,0 +1,19 @@
+memory-static:
+ extends: .dedicated-no-docs-no-db-pull-cache-job
+ script:
+ # Uses two different reports from the 'derailed_benchmars' gem.
+
+ # Loads each of gems in the Gemfile and checks how much memory they consume when they are required.
+ # 'derailed_benchmarks' internally uses 'get_process_mem'
+ - scripts/memory-static 'tmp/memory_static_full_report.txt' 'tmp/memory_static_metrics.txt'
+
+ # Outputs detailed information about objects created while gems are loaded.
+ # 'derailed_benchmarks' internally uses 'memory_profiler'
+ - scripts/memory-static-objects 'tmp/memory_static_objects_full_report.txt' 'tmp/memory_static_metrics.txt'
+ artifacts:
+ paths:
+ - tmp/memory_static_full_report.txt
+ - tmp/memory_static_objects_full_report.txt
+ - tmp/memory_static_metrics.txt
+ reports:
+ metrics: tmp/memory_static_metrics.txt