Rack MP
Memory profiler for Rack apps (on Ruby 2)
Installation
Add this line to your application's Gemfile:
gem 'mp'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mp
Usage
Mount MP as a middleware.
Visit a path with __mp__=counts
somewhere in the query string.
Check the response headers for X-MP-ObjectCounts
.
TODO
- Make the header smaller (serialize to "OBJNAME:N1:N2,...", for example)
- Use Ruby 2.1's excellent objspace library to do full object profiling, and serve beautiful graphs and whatnot. MaƱana.
Contributing
- Fork it ( https://github.com/[my-github-username]/mp/fork )
- 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 a new Pull Request