NOTE: This project is deprecated and no longer needed, with Ruby 2.2.+ and Coverband 1.1, it is unnecessary. If you are on really old Ruby or Coverband, I recommend updating.
This is a C extension to run coverband on Ruby 1.9.3+ much much faster that with the pure Ruby version. This has been tested with Ruby 1.9.3, 2.0,x, 2.1.x
This gem does nothing on its own. So make sure you already have setup the coverband gem. I recommend using just coverband
to get run time code coverage working on your project. Then adding this gem once everything is configured and working to reduce the performance overhead of the original gem.
Add this line to your application's Gemfile, after the existing coverband line:
gem 'coverband'
gem 'coverband_ext'
And then execute:
$ bundle
Or install it yourself as:
$ gem install coverband coverband_ext
Follow the normal Coverband usage... Include this gem below the coverband gem in your Gemfile
. Make sure you are on Coverband 1.0.0 or above to have coverband detect and use this extension. With this gem loaded coverband will go ahead and use the available C extension methods to see a significant performance improvement.
No other changes should be required to receive the additional perf improvements.
I have actually slightly improved the perf again since the V2 version in the benchmarks below.
ab -n 100 -c5 http://small.app.com:80/
- No Coverband
- Time taken for tests: 3.980 seconds / 3.999 seconds
- Ruby Coverband
- Time taken for tests: 31.489 seconds / 29.064 seconds
- Ruby Coverband C Ext V1
- Time taken for tests: 14.679 seconds / 12.033 seconds
- Ruby Coverband C Ext V2 (which includes Regex support)
- Time taken for tests: 6.131 seconds / 6.321 seconds
ab -n 50 -c5 http://pipeline.lsdev.co:80/pipeline/cities
- No Coverband
- Time taken for tests: 31.347 seconds / 31.298 seconds
- Ruby Coverband
- Time taken for tests: 336.53 seconds / 331.89 seconds
- Ruby Coverband C Ext V2 (which includes Regex support)
- Time taken for tests: 42.785 seconds / 43.343 seconds
- 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