foreman-packaging
foreman-packaging copied to clipboard
Add rubygems for profiling and performance analyzing
Would it make sense to add a tool for profiling the rails requests? https://github.com/MiniProfiler/rack-mini-profiler
Requires: https://github.com/theforeman/foreman/pull/9897
Fixes #36898
Perhaps, but then I'd expect a foreman-profiling
package that pulls these gems in. To achieve that, we have bundler.d and subpackages in foreman.spec
. For foreman-proxy there's a similar setup. The benefit is that it's easier for end users to set up and for packagers we'd benefit from automatic updates to these gems.
@ekohl agreed. I have a remaining question:
Adding bundler.d/profiling.rb
could either be done in the spec-file or by adding it to https://github.com/theforeman/foreman.
The downside of adding it to foreman directly is that it will automatically be enabled on dev-boxes as well. Is that OK or is there a third option I currently just do not see.
I could add it as bundler.d/profiling.rb.off
, but that seems hacky as well :thinking:
The correct solution is in foreman.git. Otherwise you have all the downsides and none of the upsides. Automatic packages updates won't work, we need to keep it in sync between Debian and RPM.
You actually have optional groups in bundler: https://bundler.io/guides/groups.html#optional-groups-and-bundlewith
group :profiling, optional: true do
# ...
end
I see, can I achieve the group becoming active by installing the foreman-profiling sub-package?
I would assume I have to configure it somewhere. Maybe as a %post
in the spec-file.
I see, can I achieve the group becoming active by installing the foreman-profiling sub-package? I would assume I have to configure it somewhere. Maybe as a
%post
in the spec-file.
I'd patch the optional: true
part out in packaging with a simple sed
statement. That needs to be duplicated for Debian and RPM, but once implemented it shouldn't change.
@ekohl is this ready to merge now?