Report bundler RSS violations in CI/CD
In gitlab-compose-kit#65 (closed) I found a problem with a large amount of memory being allocated by a dependency in Gemfile
. We already have a CI job in place that reports memory use caused by bundler require
s, but it did not catch this issue, because the memory in this case was allocated outside of the Ruby heap (this can happen when C-extensions or FFI are used).
A more reliable solution is to probe actual process RSS between requires, which can be done with trace points. If a require causes an unusual jump in memory use, we should fail the build or use an MR bot to post an alert. That way we would have caught the problem early, when the library was first added.