Lightweight monitor for performance regressions in Development. Setup thresholds for methods in milliseconds and be alerted when they run over. Basically, try to catch performance mistakes as close as possible to when they are made.
Uses notifier to interact with Growl or whatnot.
Pre-Alpha quality (no tests, experimenting, etc.)
Add this line to your application's Gemfile:
gem 'watches_benchmark', github: 'zhubert/watches_benchmark'
And then execute:
Enable it in whatever environments you would like:
Include it in whichever classes you want to watch and specify a hash of method_name to millisecond mappings:
include WatchesBenchmark watches_benchmark method_a: 15, method_b: 20
Whenever that method takes longer than your threshold, the log will show (in red):
Performance Regression: method_a took 16.85ms, threshold is 15ms
- 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