RackProf
Rack middleware for profiling.
Installation
gem 'rack_prof'
or
$ gem install rack_prof
Usage
Modify config.ru
like:
use RackProf
require ::File.('../config/environment', __FILE__)
run YourApp::Application
You might need below to avoid 'stack level too deep' error:
RubyVM::InstructionSequence.compile_option = {
:tailcall_optimization => true,
:trace_instruction => false
}
Access to your application with a parameter 'profile=true' like:
http://localhost:3000/books?profile=true
You can specify printer like:
http://localhost:3000/books?profile=true&printer=flat
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request