Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Document rack-mini-profiler integration #26

Open
timriley opened this issue Jan 15, 2017 · 4 comments
Open

Document rack-mini-profiler integration #26

timriley opened this issue Jan 15, 2017 · 4 comments

Comments

@timriley
Copy link
Member

Would be good to have something equivalent to Hanami's instructions: https://github.com/MiniProfiler/rack-mini-profiler#hanami

@dNitza
Copy link

dNitza commented May 29, 2017

I have setup rack-mini-profiler in a dry-web project and am using the following config:

Rack::MiniProfiler.profile_method(Dry::View::Renderer, :call)

Rack::MiniProfiler.config.storage = Rack::MiniProfiler::FileStore
Rack::MiniProfiler.config.storage_options = { path: "tmp" }
Rack::MiniProfiler.config.backtrace_remove = opts[:root].to_s + "/"
Rack::MiniProfiler.config.backtrace_includes =  [/^\/?(apps|components|config|core|lib|spec)/]

use Rack::MiniProfiler

I followed a combination of the railtie in rack-mini-profiler and the docs for Hanami. I just wonder if there is a better method to profile than call in Dry::View::Renderer.

@davydovanton
Copy link
Member

@timriley hey! if you have a simple dry-web application with html views I can try to help with integration with the gem :)

@timriley
Copy link
Member Author

@davydovanton awesome, thanks! How about on https://github.com/dry-rb/dry-web-blog? It has exactly one view right now ;)

@davydovanton
Copy link
Member

@timriley great! i'll take a look 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants