This engine provides NewRelic-like functionality to rails apps.
I wanted to be able to monitor my rails applicaiton performance without having to pay someone or sending telemetry data outside my network.
How to use my plugin.
Add this line to your application's Gemfile:
gem 'rails_monitoring_engine'
And then execute:
$ bundle install
Add the following code:
# config/initializers/rails_monitoring_engine.rb
RailsMonitoringEngine.enable!
To set up the development environment run the following:
$ bundle install --path vendor/bundle --clean
rails db:create db:migrate
To add a model run the following:
rails g model <model name>
Edit/test your migration then annotate it via the following command:
rails app:rails_monitoring_engine::annotate_models
I'm aiming for 100% test coverage so I feel more confident when making changes.
To generate a coverage report execute the following:
rails app:simplecov
To see the coverage detail report start the server and go to: http://localhost:3000/coverage/
To run a performance test using the Apache Benchmarking Tool start the server in one shell via
cd test/dummy
rails server
Then, in another shell, execute the following:
rails app:test:performance
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.