Project

gem_bench

0.06
No release in over a year
* Benchmark different versions of same or similar gems * Copy & Re-namespace any gem to benchmark side-by-side with `benchmarks-ips` * Enforce Gemfile version constraints * Regex search across all installed gem's source code to find issues quickly * Trim down app load times by keeping your worst players on the bench (useful for beating Heroku slug load time cutoff)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.0, >= 1.0.2
~> 1.40
>= 10
~> 3.13
~> 1.0, >= 1.0.6
~> 0.9, >= 0.9.34
~> 0.0.10
~> 0.5, >= 0.5.2

Runtime

>= 1.14
~> 1.1, >= 1.1.4
 Project Readme

galtzo-floss Logo by GitHub

πŸͺ‘ GemBench

Version Ruby Users Forum GitHub tag (latest SemVer) License: MIT Total downloads CodeCov Test Coverage Coveralls Test Coverage QLTY Test Coverage QLTY Maintainability CI Heads CI Runtime Dependencies @ HEAD CI Current CI Truffle Ruby CI JRuby Deps Locked Deps Unlocked CI Test Coverage CI Style Apache SkyWalking Eyes License Compatibility Check

if ci_badges.map(&:color).detect { it != "green"} ☝️ let me know on Discord or RubyForum, as I may have missed the notification.


if ci_badges.map(&:color).all? { it == "green"} πŸ‘‡οΈ send money so I can do more of this. FLOSS maintenance is now my full-time job.

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal Buy me a coffee Donate at ko-fi.com

πŸ‘£ How will this project approach the September 2025 hostile takeover of RubyGems? πŸš‘οΈ

I've summarized my thoughts in this blog post.

🌻 Synopsis Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0 ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5

πŸ’‘ Info you can shake a stick at

Tokens to Remember Gem name Gem namespace
Works with JRuby JRuby 9.2 Compat JRuby 9.3 Compat
JRuby 9.4 Compat JRuby 10.0 Compat JRuby current Compat JRuby HEAD Compat
Works with Truffle Ruby Truffle Ruby 22.3 Compat Truffle Ruby 23.0 Compat Truffle Ruby 23.1 Compat
Truffle Ruby 24.2 Compat Truffle Ruby 25.0 Compat Truffle Ruby 33.0 Compat Truffle Ruby current Compat Truffle Ruby HEAD Compat
Works with MRI Ruby 4 Ruby current Compat Ruby HEAD Compat
Works with MRI Ruby 3 Ruby 3.0 Compat Ruby 3.1 Compat Ruby 3.2 Compat Ruby 3.3 Compat Ruby 3.4 Compat
Works with MRI Ruby 2 Ruby 2.3 Compat
Ruby 2.4 Compat Ruby 2.5 Compat Ruby 2.6 Compat Ruby 2.7 Compat
Support & Community Join Me on Daily.dev's RubyFriends Get help from RubyForum Live Chat on Discord Get help from me on Upwork Get help from me on Codementor
Source Source on GitLab.com Source on CodeBerg.org Source on GitHub.com The best SHA: dQw4w9WgXcQ!
Documentation Current release on RubyDoc.info YARD on Galtzo.com Maintainer Blog GitLab Wiki GitHub Wiki
Compliance License: MIT Apache license compatibility: Category A πŸ“„ilo-declaration-img Security Policy Contributor Covenant 2.1 SemVer 2.0.0
Style Enforced Code Style Linter Keep-A-Changelog 1.0.0 Gitmoji Commits Compatibility appraised by: appraisal2
Maintainer πŸŽ–οΈ Follow Me on LinkedIn Follow Me on Ruby.Social Follow Me on Bluesky Contact Maintainer My technical writing
... πŸ’– Find Me on WellFound: Find Me on CrunchBase My LinkTree More About Me 🧊 πŸ™ πŸ›– πŸ§ͺ

Compatibility

Compatible with MRI Ruby 2.3+, JRuby, and TruffleRuby. CI workflows and Appraisals are generated for MRI Ruby 2.4+. This test floor is configured by ruby.test_minimum in .kettle-jem.yml and may be higher than the gem's runtime compatibility floor when legacy Rubies are not practical for the current toolchain.

kettle-dev Logo by Aboling0, CC BY-SA 4.0

The amazing test matrix is powered by the kettle-dev stack.

How kettle-dev manages complexity in tests
Gem Source Role Total downloads
appraisal2 GitHub multi-dependency Appraisal matrix generation Total downloads for appraisal2
appraisal2-rubocop GitHub RuboCop Appraisal generator integration Total downloads for appraisal2-rubocop
kettle-dev GitHub development, release, and CI workflow tooling Total downloads for kettle-dev
kettle-jem GitHub Appraisals & CI workflow templates Total downloads for kettle-jem
kettle-soup-cover GitHub SimpleCov coverage policy and reporting Total downloads for kettle-soup-cover
kettle-test GitHub standard test runner and coverage harness Total downloads for kettle-test
rubocop-lts GitHub Ruby-version-aware linting Total downloads for rubocop-lts
turbo_tests2 GitHub parallel test execution Total downloads for turbo_tests2

Federated DVCS

Find this repo on federated forges (Coming soon!)
Federated DVCS Repository Status Issues PRs Wiki CI
πŸ§ͺ galtzo-floss/gem_bench on GitLab The Truth πŸ’š πŸ’š πŸ’š 🐭 Tiny Matrix
🧊 galtzo-floss/gem_bench on CodeBerg An Ethical Mirror (Donate) πŸ’š πŸ’š βž– ⭕️ No Matrix
πŸ™ galtzo-floss/gem_bench on GitHub Another Mirror πŸ’š πŸ’š πŸ’š πŸ’― Full Matrix

Enterprise Support Tidelift

Available as part of the Tidelift Subscription.

Need enterprise-level guarantees?

The maintainers of this and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.

Get help from me on Tidelift

  • πŸ’‘Subscribe for support guarantees covering all your FLOSS dependencies
  • πŸ’‘Tidelift is part of Sonar
  • πŸ’‘Tidelift pays maintainers to maintain the software you depend on!
    πŸ“Š@Pointy Haired Boss: An enterprise support subscription is "never gonna let you down", and supports open source maintainers

Alternatively:

  • Ruby Users Forum
  • Live Chat on Discord
  • Get help from me on Upwork
  • Get help from me on Codementor

✨ Installation

Install the gem and add to the application's Gemfile by executing:

bundle add gem_bench

If bundler is not being used to manage dependencies, install the gem by executing:

gem install gem_bench

βš™οΈ Configuration

GemBench reads the active Bundler/RubyGems installation by default. Pass a Gemfile path or finder options to GemBench.find, GemBench.check, or the corresponding command-line entry point when the target project is not the current bundle. There is no global configuration file.

πŸ”§ Basic Usage

Works with Ruby >= 2.3.

Examples

Getting tired of seeing this `irb` warning, perhaps?
$ bundle exec rails console
Loading staging environment (Rails M.m.p)
irb: warn: can't alias context from irb_context.

Find out what gems may be causing it by defining context!

>> require 'gem_bench'
=> true
>> bad_context_maybes = GemBench.find(look_for_regex: /def context/).starters
[GemBench] Will search for gems in ["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems", "/Users/pboling/.rvm/gems/ruby-2.4.0@global/gems", "/Users/pboling/.rvm/gems/ruby-2.4.0@foss/bundler/gems"]
[GemBench] Detected 11 loaded gems + 2 loaded gems which GemBench is configured to ignore.
=> [byebug, diff-lcs]

Then find the file with the first occurrence of the regex in each:

>> bad_context_maybes.map { |bcm| bcm.stats.map(&:first) }
=> [["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems/byebug-9.0.6/lib/byebug/command.rb"], ["/Users/pboling/.rvm/gems/ruby-2.4.0@foss/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb"]]
Find what gems have `RAILS_ENV` specific code!

Let's try to find what libraries might be using a conditional guard to alter their behavior in a specific Rails environment.

# Not a perfect regex, but pretty good: https://rubular.com/r/b7tdIoYOVQM2RR
# RAILS_ENV == "development"
# Rails.env.development?
# Rails.env == "development"
# ENV["RAILS_ENV"] == "development"
# ENV.fetch("RAILS_ENV") == "development"
>> require "gem_bench"
=> true
>> conditional_rails_behavior_regex = /(ENV(\["|\.fetch\("))?rails(_|\.)env("\]|"\))?( == "|\.)development/i
>> conditional_rails_behavior = GemBench.find(look_for_regex: conditional_rails_behavior_regex).starters
=> [rack, actionpack, actioncable, actionmailer, rubocop, railties, rubocop-ruby2_7, sass, sass-rails]
>> print conditional_rails_behavior.map {|gem| "#{gem.name} has Rails.env condition in #{gem.stats}" }.join("\n")
rack has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/ruby/gems/2.7.0/gems/rack-mini-profiler-3.1.0/lib/mini_profiler_rails/railtie.rb", 1154]]
actionpack has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/ruby/gems/2.7.0/gems/actionpack-3.2.22.5/lib/action_controller/metal/force_ssl.rb", 1377]]
actioncable has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/ruby/gems/2.7.0/gems/actioncable-5.2.8.1/lib/action_cable/engine.rb", 886]]
actionmailer has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/ruby/gems/2.7.0/gems/actionmailer-7.0.5/lib/action_mailer/railtie.rb", 807]]
rubocop has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/ruby/gems/2.7.0/gems/rubocop-ruby2_2-2.0.5/lib/rubocop/ruby2_2/railtie.rb", 131]]
railties has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/ruby/gems/2.7.0/gems/railties-3.2.22.5/lib/rails.rb", 2478]]
rubocop-ruby2_7 has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/ruby/gems/2.7.0/gems/rubocop-ruby2_7-2.0.5/lib/rubocop/ruby2_7/railtie.rb", 131]]
sass has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/ruby/gems/2.7.0/gems/sass-rails-5.1.0/lib/sass/rails/railtie.rb", 3349]]
sass-rails has Rails.env condition in [["/Users/pboling/.asdf/installs/ruby/2.7.8/lib/ruby/gems/2.7.0/gems/sass-rails-5.1.0/lib/sass/rails/railtie.rb", 3349]]
Basic Gemfile Analysis

Fire up an irb session or a rails console and then:

>> require 'gem_bench'
=> true
>> team = GemBench.check({verbose: true}) # verbose: true => print output, verbose: false => just returns a GemBench::Team object you can inspect.

Here is an example irb session where I have installed only gem_bench, rails, and bundler. For the first run I don't require any gems besides gem_bench.

∴ irb
>> require 'gem_bench'
=> true
>> team = GemBench.check({verbose: true})
[GemBench] Will search for gems in ["/Users/pboling/.rvm/gems/ruby-1.9.3-head@foss/gems", "/Users/pboling/.rvm/gems/ruby-1.9.3-head@global/gems", "/Users/pboling/.rvm/gems/ruby-1.9.3-head@foss/bundler/gems"]
[GemBench] Will check Gemfile at /Users/pboling/Documents/src/my/gem_bench/Gemfile.
[GemBench] Detected 0 loaded gems
  (excluding the 2 loaded gems which GemBench is configured to ignore)
[GemBench] No gems were evaluated by GemBench.
[GemBench] Usage: Require another gem in this session to evaluate it.
  Example:
    require 'rails'
    GemBench.check({verbose: true})
[GemBench] Evaluated 0 gems against your Gemfile but found no primary dependencies which can safely skip require on boot (require: false).

For the second run I require 'rails' as well, and now I can see which rails dependencies are required at boot time. I am in a project with a Gemfile, (gem_bench) but it doesn't depend on rails.

∴ irb
>> require 'gem_bench'
=> true
>> require 'rails'
=> true
>> team = GemBench.check({verbose: true})
[GemBench] Will search for gems in ["/Users/pboling/.rvm/gems/ruby-1.9.3-head@foss/gems", "/Users/pboling/.rvm/gems/ruby-1.9.3-head@global/gems", "/Users/pboling/.rvm/gems/ruby-1.9.3-head@foss/bundler/gems"]
[GemBench] Will check Gemfile at /Users/pboling/Documents/src/my/gem_bench/Gemfile.
[GemBench] Detected 14 loaded gems
  (excluding the 2 loaded gems which GemBench is configured to ignore)
[GemBench] You might want to verify that activesupport v3.2.13 really has a Rails::Railtie or Rails::Engine.  Check these files:
  ["/Users/pboling/.rvm/gems/ruby-1.9.3-head@foss/gems/activesupport-3.2.11/lib/active_support/i18n_railtie.rb", 146]
[GemBench] You might want to verify that actionpack v3.2.13 really has a Rails::Railtie or Rails::Engine.  Check these files:
  ["/Users/pboling/.rvm/gems/ruby-1.9.3-head@foss/gems/actionpack-3.2.11/lib/action_controller/railtie.rb", 248]
[GemBench] You might want to verify that railties v3.2.13 really has a Rails::Railtie or Rails::Engine.  Check these files:
  ["/Users/pboling/.rvm/gems/ruby-1.9.3-head@foss/gems/railties-3.2.11/lib/rails/application/configuration.rb", 245]
[GemBench] If you want to check for false positives, the files to check for Railties and Engines are listed above.
[GemBench] 3 out of 14 evaluated gems actually need to be loaded at boot time. They are:
  [SUGGESTION] 1) gem 'activesupport', '~> 3.2.13'
  [SUGGESTION] 2) gem 'actionpack', '~> 3.2.13'
  [SUGGESTION] 3) gem 'railties', '~> 3.2.13'
[GemBench] Evaluated 14 gems against your Gemfile but found no primary dependencies which can safely skip require on boot (require: false).

See that? Only 3 of the 14 gems rails loads need to be required when your app boots, technically! However, in order to prevent loading them we would have to make them primary dependencies, listed in the Gemfile, which isn't really the best idea. Moving on... If you run the check against a real app's Gemfile it will find numerous primary dependencies that don't need to be required at app boot. See Advanced Usage :)

In a random directory, in an irb session, where there is no Gemfile in sight it will give a lot more information.

Advanced Gemfile Analysis

In order to also see list gems may not be required at boot time you need to:

  1. Make sure you are in the root of a project with a Gemfile
  2. Make sure the gem is actually a dependency in the Gemfile

So here's a [fat Gemfile][bundle-group-pattern] weighing in at 265 gem dependencies. We'll use it for this example:

∴ bundle exec rails console
Welcome to RAILS. You are using ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]. Have fun ;)
Loading development environment (Rails 3.2.13)
[1] pry(main)> a = GemBench.check({verbose: true})
... # snip # ...
[GemBench] If you want to check for false positives, the files to check for Railties and Engines are listed above.
[GemBench] 74 out of 265 evaluated gems actually need to be loaded at boot time. They are:
  [SUGGESTION] 1) gem 'activesupport', '~> 3.2.13', require: false
  [SUGGESTION] 2) gem 'sprockets', '~> 2.2.2', require: false
  [SUGGESTION] 3) gem 'actionpack', '~> 3.2.13', require: false
  [SUGGESTION] 4) gem 'actionmailer', '~> 3.2.13', require: false
  [SUGGESTION] 5) gem 'activerecord', '~> 3.2.13', require: false
  [SUGGESTION] 6) gem 'activerecord-postgres-array', '~> 0.0.9', require: false
  [SUGGESTION] 7) gem 'activerecord-postgres-hstore', '~> 0.7.6', require: false
  [SUGGESTION] 8) gem 'activeresource', '~> 3.2.13', require: false
  [SUGGESTION] 9) gem 'railties', '~> 3.2.13', require: false
  [SUGGESTION] 10) gem 'acts-as-messageable', '~> 0.4.8', require: false
  [SUGGESTION] 11) gem 'airbrake', '~> 3.1.10', require: false
  [SUGGESTION] 12) gem 'asset_sync', '~> 0.5.4', require: false
  [SUGGESTION] 13) gem 'slim', '~> 1.3.6', require: false
  [SUGGESTION] 14) gem 'sidekiq', '~> 2.10.0', require: false
  [SUGGESTION] 15) gem 'aws-sdk', '~> 1.8.5', require: false
  [SUGGESTION] 16) gem 'better_errors', '~> 0.8.0', require: false
  [SUGGESTION] 17) gem 'sass', '~> 3.2.7', require: false
  [SUGGESTION] 18) gem 'bootstrap-sass', '~> 2.3.1.0', require: false
  [SUGGESTION] 19) gem 'haml', '~> 4.0.1', require: false
  [SUGGESTION] 20) gem 'bullet', '~> 4.5.0', require: false
  [SUGGESTION] 21) gem 'parallel', '~> 0.6.4', require: false
  [SUGGESTION] 22) gem 'cells', '~> 3.8.8', require: false
  [SUGGESTION] 23) gem 'coffee-rails', '~> 3.2.2', require: false
  [SUGGESTION] 24) gem 'compass', '~> 0.12.2', require: false
  [SUGGESTION] 25) gem 'compass-rails', '~> 1.0.3', require: false
  [SUGGESTION] 26) gem 'csv_pirate', '~> 5.0.7', require: false
  [SUGGESTION] 27) gem 'devise', '~> 2.2.3', require: false
  [SUGGESTION] 28) gem 'devise_invitable', '~> 1.1.3', require: false
  [SUGGESTION] 29) gem 'rails', '~> 3.2.13', require: false
  [SUGGESTION] 30) gem 'dismissible_helpers', '~> 0.1.5', require: false
  [SUGGESTION] 31) gem 'dotenv', '~> 0.6.0', require: false
  [SUGGESTION] 32) gem 'dry_views', '~> 0.0.2', require: false
  [SUGGESTION] 33) gem 'sass-rails', '~> 3.2.6', require: false
  [SUGGESTION] 34) gem 'font-awesome-sass-rails', '~> 3.0.2.2', require: false
  [SUGGESTION] 35) gem 'foundation-icons-sass-rails', '~> 2.0.0', require: false
  [SUGGESTION] 36) gem 'g', '~> 1.7.2', require: false
  [SUGGESTION] 37) gem 'geocoder', '~> 1.1.6', require: false
  [SUGGESTION] 38) gem 'geokit', '~> 1.6.5', require: false
  [SUGGESTION] 39) gem 'geokit-rails3', '~> 0.1.5', require: false
  [SUGGESTION] 40) gem 'pry', '~> 0.9.12', require: false
  [SUGGESTION] 41) gem 'rspec', '~> 2.13.0', require: false
  [SUGGESTION] 42) gem 'spork', '~> 1.0.0rc3', require: false
  [SUGGESTION] 43) gem 'haml-rails', '~> 0.4', require: false
  [SUGGESTION] 44) gem 'handlebars_assets', '~> 0.12.0', require: false
  [SUGGESTION] 45) gem 'hirefire-resource', '~> 0.0.2', require: false
  [SUGGESTION] 46) gem 'jquery-rails', '~> 2.2.1', require: false
  [SUGGESTION] 47) gem 'html5-rails', '~> 0.0.7', require: false
  [SUGGESTION] 48) gem 'jquery-ui-rails', '~> 3.0.1', require: false
  [SUGGESTION] 49) gem 'kaminari', '~> 0.14.1', require: false
  [SUGGESTION] 50) gem 'neography', '~> 1.0.9', require: false
  [SUGGESTION] 51) gem 'neoid', '~> 0.1.2', require: false
  [SUGGESTION] 52) gem 'nested_form', '~> 0.3.2', require: false
  [SUGGESTION] 53) gem 'newrelic_rpm', '~> 3.6.0.78', require: false
  [SUGGESTION] 54) gem 'parallel_tests', '~> 0.10.4', require: false
  [SUGGESTION] 55) gem 'pg', '~> 0.15.0', require: false
  [SUGGESTION] 56) gem 'rspec-rails', '~> 2.13.0', require: false
  [SUGGESTION] 57) gem 'pg_power', '~> 1.3.1', require: false
  [SUGGESTION] 58) gem 'pry-rails', '~> 0.2.2', require: false
  [SUGGESTION] 59) gem 'quiet_assets', '~> 1.0.2', require: false
  [SUGGESTION] 60) gem 'remotipart', '~> 1.0.5', require: false
  [SUGGESTION] 61) gem 'rails_admin', '~> 0.4.6', require: false
  [SUGGESTION] 62) gem 'requirejs-rails', '~> 0.9.1.1', require: false
  [SUGGESTION] 63) gem 'rolify', '~> 3.2.0', require: false
  [SUGGESTION] 64) gem 'rspec-cells', '~> 0.1.6', require: false
  [SUGGESTION] 65) gem 'sanitize_email', '~> 1.0.6', require: false
  [SUGGESTION] 66) gem 'simplecov', '~> 0.7.1', require: false
  [SUGGESTION] 67) gem 'spork-rails', '~> 3.2.1', require: false
  [SUGGESTION] 68) gem 'sprockets-rails', '~> 0.0.1', require: false
  [SUGGESTION] 69) gem 'stackable_flash', '~> 0.0.7', require: false
  [SUGGESTION] 70) gem 'state_machine', '~> 1.2.0', require: false
  [SUGGESTION] 71) gem 'teabag', '~> 0.4.6', require: false
  [SUGGESTION] 72) gem 'turbo-sprockets-rails3', '~> 0.3.6', require: false
  [SUGGESTION] 73) gem 'turbolinks', '~> 1.1.1', require: false
  [SUGGESTION] 74) gem 'zurb-foundation', '~> 4.1.1', require: false
[GemBench] Evaluated 265 gems and Gemfile at /Users/pboling/Documents/RubyMineProjects/simple/Gemfile.
[GemBench] Here are 45 suggestions for improvement:
  [SUGGESTION] 1) gem 'tilt', '~> 1.3.6'
  [SUGGESTION] 2) gem 'json', '~> 1.7.7'
  [SUGGESTION] 3) gem 'annotate', '~> 2.5.0'
  [SUGGESTION] 4) gem 'nokogiri', '~> 1.5.9'
  [SUGGESTION] 5) gem 'redis', '~> 3.0.3'
  [SUGGESTION] 6) gem 'sinatra', '~> 1.3.6'
  [SUGGESTION] 7) gem 'autoscaler', '~> 0.2.1'
  [SUGGESTION] 8) gem 'binding_of_caller', '~> 0.7.1'
  [SUGGESTION] 9) gem 'bourne', '~> 1.4.0'
  [SUGGESTION] 10) gem 'brakeman', '~> 1.9.5'
  [SUGGESTION] 11) gem 'cancan', '~> 1.6.9'
  [SUGGESTION] 12) gem 'capybara', '~> 2.0.3'
  [SUGGESTION] 13) gem 'chronic', '~> 0.9.1'
  [SUGGESTION] 14) gem 'compass-h5bp', '~> 0.1.1'
  [SUGGESTION] 15) gem 'database_cleaner', '~> 0.9.1'
  [SUGGESTION] 16) gem 'debugger', '~> 1.5.0'
  [SUGGESTION] 17) gem 'devise-async', '~> 0.7.0'
  [SUGGESTION] 18) gem 'dotenv-rails', '~> 0.6.0'
  [SUGGESTION] 19) gem 'email_spec', '~> 1.4.0'
  [SUGGESTION] 20) gem 'fabrication', '~> 2.6.4'
  [SUGGESTION] 21) gem 'fakeweb', '~> 1.3.0'
  [SUGGESTION] 22) gem 'flag_shih_tzu', '~> 0.3.2'
  [SUGGESTION] 23) gem 'friendly_id', '~> 4.0.9'
  [SUGGESTION] 24) gem 'guard', '~> 1.7.0'
  [SUGGESTION] 25) gem 'guard-rspec', '~> 2.5.2'
  [SUGGESTION] 26) gem 'i18n-airbrake', '~> 0.0.2'
  [SUGGESTION] 27) gem 'km', '~> 1.1.3'
  [SUGGESTION] 28) gem 'localtunnel', '~> 0.3'
  [SUGGESTION] 29) gem 'mailcatcher', '~> 0.5.10'
  [SUGGESTION] 30) gem 'numbers_and_words', '~> 0.6.0'
  [SUGGESTION] 31) gem 'oj', '~> 2.0.10'
  [SUGGESTION] 32) gem 'omniauth-facebook', '~> 1.4.1'
  [SUGGESTION] 33) gem 'poltergeist', '~> 1.0.2'
  [SUGGESTION] 34) gem 'pry-doc', '~> 0.4.5'
  [SUGGESTION] 35) gem 'puma', '~> 2.0.0.b7'
  [SUGGESTION] 36) gem 'queryable_array', '~> 0.0.1'
  [SUGGESTION] 37) gem 'rails_best_practices', '~> 1.13.4'
  [SUGGESTION] 38) gem 'redcarpet', '~> 2.2.2'
  [SUGGESTION] 39) gem 'redis-rails', '~> 3.2.3'
  [SUGGESTION] 40) gem 'shoulda-matchers', '~> 1.4.2'
  [SUGGESTION] 41) gem 'sidekiq-status', '~> 0.3.0'
  [SUGGESTION] 42) gem 'terminal-notifier', '~> 1.4.2'
  [SUGGESTION] 43) gem 'test-unit', '~> 2.5.4'
  [SUGGESTION] 44) gem 'uglifier', '~> 1.3.0'
  [SUGGESTION] 45) gem 'vestal_versions', '~> 1.2.3'

gem_bench found 45 gems which are listed as primary dependencies in my Gemfile which I can add require: false to. After adding require: false, try all these locally:

  1. running your tests
  2. starting the console
  3. starting the server and using your app
  4. running rake tasks if you have any special ones

When doing these, you will probably encounter errors saying that a library is not available. You should then add require "foo" where the error happens. Keep in mind that if this is in an initializer or environment file, you aren't saving any time when the rails server is booting. However, it does save time when running a rake task that does not invoke the environment (some do, some don't). So, if you don't think saving this time is worth the minor additional code complexity, you can exclude the require: falses in these cases.

After adding your require: falses, run gem_bench again. The gem's logic isn't perfect so it sometimes will find new suggested exclusions.

How much faster will my app boot loading 45 fewer gems? A bit.

Note: Some of the gems in the list above should have been excluded. They are now excluded as of gem_bench version 0.0.4.

🦷 FLOSS Funding

While galtzo-floss tools are free software and will always be, the project would benefit immensely from some funding. Raising a monthly budget of... "dollars" would make the project more sustainable.

We welcome both individual and corporate sponsors! We also offer a wide array of funding channels to account for your preferences. Currently, Open Collective is our preferred funding platform.

If you're working in a company that's making significant use of galtzo-floss tools we'd appreciate it if you suggest to your company to become a galtzo-floss sponsor.

You can support the development of galtzo-floss tools via GitHub Sponsors, Liberapay, PayPal, Open Collective and Tidelift.

πŸ“ NOTE
If doing a sponsorship in the form of donation is problematic for your company
from an accounting standpoint, we'd recommend the use of Tidelift,
where you can get a support-like subscription instead.

Open Collective for Individuals

Support us with a monthly donation and help us continue our activities. [Become a backer]

NOTE: kettle-readme-backers updates this list every day, automatically.

No backers yet. Be the first!

Open Collective for Organizations

Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]

NOTE: kettle-readme-backers updates this list every day, automatically.

No sponsors yet. Be the first!

Another way to support open-source

I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 πŸ” chickens, 2 🐢 dogs, 3 🐰 rabbits, 8 πŸˆβ€ cats).

If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in bundle fund.

I’m developing a new library, floss_funding, designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.

Floss-Funding.dev: πŸ‘‰οΈ No network calls. πŸ‘‰οΈ No tracking. πŸ‘‰οΈ No oversight. πŸ‘‰οΈ Minimal crypto hashing. πŸ’‘ Easily disabled nags

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal Buy me a coffee Donate to my FLOSS efforts at ko-fi.com

πŸ” Security

See SECURITY.md.

🀝 Contributing

If you need some ideas of where to help, you could work on adding more code coverage, check issues or PRs, or use the gem and think about how it could be better.

We Keep A Changelog so if you make changes, remember to update it.

See CONTRIBUTING.md for more detailed instructions.

πŸš€ Release Instructions

See CONTRIBUTING.md.

Code Coverage

Coverage service badges

Coverage Graph

Coveralls Test Coverage

QLTY Test Coverage

πŸͺ‡ Code of Conduct

Everyone interacting with this project's codebases, issue trackers, chat rooms and mailing lists agrees to follow the Contributor Covenant 2.1.

🌈 Contributors

Contributors

Made with contributors-img.

Also see GitLab Contributors: https://gitlab.com/galtzo-floss/gem_bench/-/graphs/main

πŸ“Œ Versioning

This library follows Semantic Versioning 2.0.0 for its public API where practical. For most applications, prefer the Pessimistic Version Constraint with two digits of precision.

For example:

spec.add_dependency("gem_bench", "~> 2.0")
πŸ“Œ Is "Platform Support" part of the public API? More details inside.

Dropping support for a platform can be a breaking change for affected users. If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind.

To get a better understanding of how SemVer is intended to work over a project's lifetime, read this article from the creator of SemVer:

See CHANGELOG.md for a list of releases.

πŸ“„ License

The gem is available as open source under the terms of the MIT License: MIT.

Β© Copyright

See LICENSE.md for the official copyright notice.

Copyright holders
  • Copyright (c) 2013 John Joseph Bachir
  • Copyright (c) 2013-2014, 2017-2019, 2023-2024, 2026 Peter H. Boling

πŸ€‘ A request for help

Maintainers have teeth and need to pay their dentists. After getting laid off in an RIF in March, and encountering difficulty finding a new one, I began spending most of my time building open source tools. I'm hoping to be able to pay for my kids' health insurance this month, so if you value the work I am doing, I need your support. Please consider sponsoring me or the project.

To join the community or get help, use the RubyForum or Discord.

Ruby Users Forum Live Chat on Discord

To say "thanks!" ☝️ Join the community or πŸ‘‡οΈ send money.

Sponsor galtzo-floss/gem_bench on Open Source Collective πŸ’Œ Sponsor me on GitHub Sponsors πŸ’Œ Sponsor me on Liberapay πŸ’Œ Donate on PayPal

Please give the project a star ⭐ β™₯.

Many parts of this project are actively managed by a kettle-jem smart template utilizing StructuredMerge.org merge contracts.

Thanks for RTFM. ☺️

Field Value
Package gem_bench
Description πŸͺ‘ Benchmark different versions of same or similar gems
* Copy & Re-namespace any gem to benchmark side-by-side with benchmarks-ips
* Enforce Gemfile version constraints
* Regex search across all installed gem's source code to find issues quickly
* Trim down app load times by keeping your worst players on the bench (useful for beating Heroku slug load time cutoff)
Homepage https://github.com/galtzo-floss/gem_bench
Source https://github.com/galtzo-floss/gem_bench
License MIT
Funding https://github.com/sponsors/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/galtzo-floss, https://thanks.dev/gh/pboling, https://tidelift.com/funding/github/rubygems/gem_bench, https://www.buymeacoffee.com/pboling