MiniProfiler / rack-mini-profiler

Profiler for your development and production Ruby rack apps.
MIT License
3.69k stars 401 forks source link

Autoload sotrage adapters #555

Open gmcgibbon opened 1 year ago

gmcgibbon commented 1 year ago

Autoloads storage adapters because it is unnecessary to load storage adapters you won't use. Autoload lets us defer loading the file until it is referenced, so that we can require storage dependencies normally and expect them to load when called.

Depends on https://github.com/MiniProfiler/rack-mini-profiler/pull/551. I can't make a PR to this repo if my merge target is on my fork, so this will have to do for now.

codecov-commenter commented 1 year ago

Codecov Report

Merging #555 (e919aba) into master (edbcad3) will increase coverage by 0.02%. The diff coverage is 96.55%.

:exclamation: Current head e919aba differs from pull request most recent head 4026a0f. Consider uploading reports for the commit 4026a0f to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #555      +/-   ##
==========================================
+ Coverage   87.39%   87.42%   +0.02%     
==========================================
  Files          18       20       +2     
  Lines        1269     1272       +3     
==========================================
+ Hits         1109     1112       +3     
  Misses        160      160              
Impacted Files Coverage Δ
lib/mini_profiler.rb 83.85% <92.30%> (ø)
lib/mini_profiler/storage.rb 100.00% <100.00%> (ø)
lib/mini_profiler/timer_struct.rb 100.00% <100.00%> (ø)
lib/mini_profiler/timer_struct/base.rb 100.00% <100.00%> (ø)
lib/mini_profiler/timer_struct/sql.rb 85.36% <100.00%> (+0.36%) :arrow_up:
lib/rack-mini-profiler.rb 85.71% <100.00%> (-10.84%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

suryanarayanan035 commented 1 month ago

The code changes Looks good to me. We just need to sync the autoload_storage_adapaters with the latest master and resolve the conflict. After @gmcgibbon is done with the mentioned action items, we can merge this code @nateberkopec .