zombocom / derailed_benchmarks

Go faster, off the Rails - Benchmarks for your whole Rails app
2.94k stars 138 forks source link

DERAILED_SKIP_RAILS_REQUIRES var doesn't seem to work with minimal greenfield application #207

Open muriloime opened 2 years ago

muriloime commented 2 years ago

Hi,
Maybe I am doing something stupid here but I don´t think DERAILED_SKIP_RAILS_REQUIRES is working. i created the minimal app github.com:muriloime/derailed_example with derailed, and ran the following


$ DERAILED_SKIP_RAILS_REQUIRES=true bundle exec derailed bundle:mem  | head -n 10 

TOP: 39.3594 MiB
  rails/all: 32.8711 MiB
    rails: 11.6914 MiB (Also required by: active_record/railtie, active_model/railtie, and 9 others)
      rails/application: 5.1641 MiB
        active_support/key_generator: 3.9609 MiB
          openssl: 3.9609 MiB (Also required by: active_support/message_verifier, active_support/message_encryptor)
            openssl.so: 2.8984 MiB
              digest/loader: 1.543 MiB
                digest.so: 1.543 MiB
            /home/murilo/.rbenv/versions/3.0.0/lib/ruby/3.0.0/openssl/ssl: 0.6875 MiB```

It seems that even though the var is present, rails/all is still being required. 

Cheers 
Murilo
muriloime commented 2 years ago

I just realized that the last release is a bit stale

schneems commented 2 years ago

I forgot to cut a release since there was no changelog. Can you add an entry for this https://github.com/zombocom/derailed_benchmarks/commit/6821c9c4215677a3bc232170bf5ead0936567726 then I'll merge and cut a release?