MetaProfiler
meta_profiler
provides a single interface to profile small chunks of code across different ruby implementations.
Presently, it supports Rubinius, JRuby, and MRI > 1.9.2. It may support older MRIs, but they have not yet been tested.
This tool was extracted from a script I used to keep lying around in my home directory to help when trying to settle
debates about whether something was faster or slower, the easiest way to run a profile is simply to install this gem,
require it, and write your code in a profile { #code }
block, simply running your desired version of ruby on that
script will then automatically print profiling results to STDOUT.
Future plans include:
- providing a consistent report style for all implementations
- better testing (I told you it was extracted from a throwaway script, right?)
- less procedural implementation
- better documentation
- include memory profiling as an option, etc.
Installation
Add this line to your application's Gemfile:
gem 'meta_profiler'
And then execute:
$ bundle
Or install it yourself as:
$ gem install meta_profiler
Usage
TODO: Write usage instructions here
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request