-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rubygems for profiling and performance analyzing
Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
- Loading branch information
Showing
10 changed files
with
287 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
%global dynflow_sidekiq_service_name dynflow-sidekiq@ | ||
%global rake /usr/bin/rake | ||
|
||
%global release 5 | ||
%global release 6 | ||
%global prereleasesource develop | ||
%global prerelease %{?prereleasesource} | ||
|
||
|
@@ -677,6 +677,22 @@ Configuration files for the Performance Co-Pilot integration | |
%{_sysconfdir}/pcp/proc/%{name}-hotproc.conf | ||
%{_sharedstatedir}/pcp/config/pmlogconf/%{name}-hotproc | ||
|
||
%package profiling | ||
Summary: Adds rails-profiling extensions to foreman | ||
# start specfile profiling Requires | ||
Requires: rubygem(rack-mini-profiler) | ||
Requires: rubygem(memory_profiler) | ||
Requires: rubygem(stackprof) | ||
# end specfile profiling Requires | ||
|
||
%description profiling | ||
This automatically installs and enables profiling extensions to foreman. | ||
It is probably not what you want on a productive system. | ||
|
||
%files profiling | ||
%{_datadir}/%{name}/bundler.d/profiling.rb | ||
%{_datadir}/%{name}/config/initializers/rack_mini_profiler.rb | ||
|
||
%description | ||
Foreman is aimed to be a Single Address For All Machines Life Cycle Management. | ||
Foreman is based on Ruby on Rails, and this package bundles Rails and all | ||
|
@@ -711,6 +727,9 @@ webpack --bail --config config/webpack.config.js | |
%{rake} assets:precompile RAILS_ENV=production DATABASE_URL=nulldb://nohost --trace | ||
rm db/schema.rb | ||
|
||
# enable profiling if the bundler.d file is present | ||
sed -i 's/,\s*optional:\s*true//' bundler.d/profiling.rb | ||
|
||
%install | ||
rm -rf %{buildroot} | ||
|
||
|
@@ -1012,6 +1031,9 @@ exit 0 | |
%systemd_postun %{name}.socket | ||
|
||
%changelog | ||
* Tue Nov 07 2023 Markus Bucher <[email protected]> - 3.9.0-0.6.develop | ||
- Add profiling subpackage | ||
|
||
* Thu Oct 26 2023 Ewoud Kohl van Wijngaarden <[email protected]> - 3.9.0-0.5.develop | ||
- Automatically depend on selinux package if needed | ||
|
||
|
1 change: 1 addition & 0 deletions
1
packages/foreman/rubygem-memory_profiler/memory_profiler-1.0.1.gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../.git/annex/objects/qx/Z5/SHA256E-s16384--38cdb42f22d9100df2eba0365c199724b58b05c38e765cd764a07392916901b1.1.gem/SHA256E-s16384--38cdb42f22d9100df2eba0365c199724b58b05c38e765cd764a07392916901b1.1.gem |
70 changes: 70 additions & 0 deletions
70
packages/foreman/rubygem-memory_profiler/rubygem-memory_profiler.spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# template: default | ||
%global gem_name memory_profiler | ||
|
||
Name: rubygem-%{gem_name} | ||
Version: 1.0.1 | ||
Release: 1%{?dist} | ||
Summary: Memory profiling routines for Ruby 2.5+ | ||
License: MIT | ||
URL: https://github.com/SamSaffron/memory_profiler | ||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem | ||
|
||
# start specfile generated dependencies | ||
Requires: ruby >= 2.5.0 | ||
BuildRequires: ruby >= 2.5.0 | ||
BuildRequires: rubygems-devel | ||
BuildArch: noarch | ||
# end specfile generated dependencies | ||
|
||
%description | ||
Memory profiling routines for Ruby 2.5+. | ||
|
||
|
||
%package doc | ||
Summary: Documentation for %{name} | ||
Requires: %{name} = %{version}-%{release} | ||
BuildArch: noarch | ||
|
||
%description doc | ||
Documentation for %{name}. | ||
|
||
%prep | ||
%setup -q -n %{gem_name}-%{version} | ||
|
||
%build | ||
# Create the gem as gem install only works on a gem file | ||
gem build ../%{gem_name}-%{version}.gemspec | ||
|
||
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir | ||
# by default, so that we can move it into the buildroot in %%install | ||
%gem_install | ||
|
||
%install | ||
mkdir -p %{buildroot}%{gem_dir} | ||
cp -a .%{gem_dir}/* \ | ||
%{buildroot}%{gem_dir}/ | ||
|
||
mkdir -p %{buildroot}%{_bindir} | ||
cp -a .%{_bindir}/* \ | ||
%{buildroot}%{_bindir}/ | ||
|
||
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x | ||
|
||
%files | ||
%dir %{gem_instdir} | ||
%{_bindir}/ruby-memory-profiler | ||
%license %{gem_instdir}/LICENSE.txt | ||
%{gem_instdir}/bin | ||
%{gem_libdir} | ||
%exclude %{gem_cache} | ||
%{gem_spec} | ||
|
||
%files doc | ||
%doc %{gem_docdir} | ||
%doc %{gem_instdir}/CHANGELOG.md | ||
%doc %{gem_instdir}/README.md | ||
|
||
%changelog | ||
* Mon Nov 06 2023 Markus Bucher <[email protected]> 1.0.1-1 | ||
- Add rubygem-memory_profiler generated by gem2rpm using the default template | ||
|
1 change: 1 addition & 0 deletions
1
packages/foreman/rubygem-rack-mini-profiler/rack-mini-profiler-3.1.1.gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../.git/annex/objects/1W/4M/SHA256E-s412672--3bbcb84abdfe51e05341a58d6714e027499f974245c4738c74ee38400e3e72a3.1.gem/SHA256E-s412672--3bbcb84abdfe51e05341a58d6714e027499f974245c4738c74ee38400e3e72a3.1.gem |
63 changes: 63 additions & 0 deletions
63
packages/foreman/rubygem-rack-mini-profiler/rubygem-rack-mini-profiler.spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# template: default | ||
%global gem_name rack-mini-profiler | ||
|
||
Name: rubygem-%{gem_name} | ||
Version: 3.1.1 | ||
Release: 1%{?dist} | ||
Summary: Profiles loading speed for rack applications | ||
License: MIT | ||
URL: https://miniprofiler.com | ||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem | ||
|
||
# start specfile generated dependencies | ||
Requires: ruby >= 2.6.0 | ||
BuildRequires: ruby >= 2.6.0 | ||
BuildRequires: rubygems-devel | ||
BuildArch: noarch | ||
# end specfile generated dependencies | ||
|
||
%description | ||
Profiling toolkit for Rack applications with Rails integration. Client Side | ||
profiling, DB profiling and Server profiling. | ||
|
||
|
||
%package doc | ||
Summary: Documentation for %{name} | ||
Requires: %{name} = %{version}-%{release} | ||
BuildArch: noarch | ||
|
||
%description doc | ||
Documentation for %{name}. | ||
|
||
%prep | ||
%setup -q -n %{gem_name}-%{version} | ||
|
||
%build | ||
# Create the gem as gem install only works on a gem file | ||
gem build ../%{gem_name}-%{version}.gemspec | ||
|
||
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir | ||
# by default, so that we can move it into the buildroot in %%install | ||
%gem_install | ||
|
||
%install | ||
mkdir -p %{buildroot}%{gem_dir} | ||
cp -a .%{gem_dir}/* \ | ||
%{buildroot}%{gem_dir}/ | ||
|
||
%files | ||
%dir %{gem_instdir} | ||
%{gem_libdir} | ||
%exclude %{gem_cache} | ||
%{gem_spec} | ||
|
||
%files doc | ||
%doc %{gem_docdir} | ||
%doc %{gem_instdir}/CHANGELOG.md | ||
%doc %{gem_instdir}/README.md | ||
%exclude %{gem_instdir}/rack-mini-profiler.gemspec | ||
|
||
%changelog | ||
* Mon Nov 06 2023 Markus Bucher <[email protected]> 3.1.1-1 | ||
- Add rubygem-rack-mini-profiler generated by gem2rpm using the default template | ||
|
Oops, something went wrong.