Add gem size information to metrics.txt in memory CI artifacts
What does this MR do?
This work is based on !29618 (merged).
In !29618 (merged), 3 files are generated in CI artifacts: memory_static_full_report.txt, memory_static_metrics.txt, memory_static_objects_full_report.txt.
This MR will extract memory usage of each Gem, from memory_static_full_report.txt, and save this into memory_static_metrics.txt.
Assume we only need top level gems, without their dependencies Each gem data is one line in format of : gem_size{name="gem_name"}
Sample memory_static_full_report.txt
TOP: 153.5078 MiB
rails/all: 26.0664 MiB
rails: 14.3633 MiB (Also required by: active_record/railtie, active_model/railtie, and 18 others)
active_support/railtie: 4.6992 MiB
active_support/i18n_railtie: 4.6953 MiB
active_support/file_update_checker: 2.6016 MiB (Also required by: rails/application/configuration)
... ...
Gem size metrics generated from the sample
gem_size_mb{name="rails/all"} 26.1
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #62722 (closed)