2019-06-13 15:14:06 +00:00
|
|
|
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'
|
2019-06-19 00:52:34 +00:00
|
|
|
- bundle exec derailed bundle:mem > tmp/memory_bundle_mem.txt
|
|
|
|
- scripts/generate-gems-size-metrics-static tmp/memory_bundle_mem.txt >> 'tmp/memory_metrics.txt'
|
2019-06-13 15:14:06 +00:00
|
|
|
|
|
|
|
# Outputs detailed information about objects created while gems are loaded.
|
|
|
|
# 'derailed_benchmarks' internally uses 'memory_profiler'
|
2019-06-19 00:52:34 +00:00
|
|
|
- bundle exec derailed bundle:objects > tmp/memory_bundle_objects.txt
|
|
|
|
- scripts/generate-gems-memory-metrics-static tmp/memory_bundle_objects.txt >> 'tmp/memory_metrics.txt'
|
2019-06-13 15:14:06 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-06-19 00:52:34 +00:00
|
|
|
- tmp/memory_*.txt
|
2019-06-13 15:14:06 +00:00
|
|
|
reports:
|
2019-06-19 00:52:34 +00:00
|
|
|
metrics: tmp/memory_metrics.txt
|