Ruby gem for production code coverage
Top 18.6% on sourcepulse
Coverband is a Ruby gem designed to collect and report on production code usage, providing line-by-line execution counts for Ruby applications. It targets developers and operations teams seeking to understand runtime behavior, identify unused code, and optimize performance in production environments. The primary benefit is gaining actionable insights into code execution with minimal performance impact.
How It Works
Coverband operates by patching Ruby's Kernel#require
and Kernel#load
to track code execution. It stores coverage data in Redis, either through a background thread or as Rack middleware. This approach allows for continuous monitoring with low overhead, distinguishing between code loaded during application startup (eager load) and code executed during runtime.
Quick Start & Requirements
gem 'coverband'
Highlighted Details
Maintenance & Community
The project is actively maintained, with contributions from various developers. Community support channels are not explicitly mentioned, but the project has a GitHub repository for issues and contributions.
Licensing & Compatibility
Limitations & Caveats
Coverband does not provide line-level coverage for view files (e.g., ERB, Slim), only file-level tracking. It is incompatible with Scout APM's auto-instrumentation (AUTO_INSTRUMENT=true
) and Bootsnap, as these interfere with its patching mechanisms. Elastic APM requires careful gem loading order to avoid conflicts.
3 months ago
Inactive