Add benchmark to config/boot.rb
require 'benchmark'
def require(file)
  puts Benchmark.measure("") {
    super
  }.format("%t require #{file}")
end
Run command in iterm2
rails runner 1 | sort -nr | head -n 150
You will see all output like this:
encore:blog (master) : 14h42m -> rails runner 1 | sort -nr | head -n 150
0.050000 require i18n
0.030000 require securerandom
0.030000 require openssl
0.030000 require concurrent/map
0.020000 require concurrent/synchronization
0.010000 require openssl/ssl
0.010000 require openssl/pkey
0.010000 require openssl.so
0.010000 require i18n/exceptions
0.010000 require concurrent/synchronization/mri_lockable_object
0.010000 require concurrent/synchronization/lockable_object
0.010000 require cgi/util
0.010000 require cgi/cookie
0.010000 require cgi
.....