940fcc9ff2
This includes several changes: - Rename memory-static to generate-gems-size-metrics-static - Rename memory-static-objects to generate-gems-memory-metrics-static - Change generate-gems-size-metrics-static interface. The script now expect `bundle exec derailed bundle:mem` output as its input. The script output to stdout, or stderr for error message. - Change generate-gems-memory-metrics-static interface. The script now expect `bundle exec derailed bundle:objects` output as its input. The script output to stdout, or stderr for error message. - Generate gem size metrics. Script generate-gems-size-metrics-static extract each gem size from `bundle exec derailed bundle:mem` output. Save output to metrics file in format: 'gem_size_mb{name="zip"} 0.5'
19 lines
904 B
YAML
19 lines
904 B
YAML
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'
|
|
- 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'
|
|
|
|
# Outputs detailed information about objects created while gems are loaded.
|
|
# 'derailed_benchmarks' internally uses 'memory_profiler'
|
|
- 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'
|
|
artifacts:
|
|
paths:
|
|
- tmp/memory_*.txt
|
|
reports:
|
|
metrics: tmp/memory_metrics.txt
|