by stevepike · 3y ago · 0 comments
Something I've been interested in is the performance impact of using https://docs.ruby-lang.org/en/3.2/Coverage.html to find unused code by profiling production. Particularly using that to figure out any gems that are never called in production. Seems like it could be made fast.
prepend_around_action :callstacking_setup, if: -> { params[:debug] == '1' }
Once the request completes, the instrumented methods are removed to remove the performance overhead.