All Projects → igorkasyanchuk → Rails_performance

igorkasyanchuk / Rails_performance

Licence: mit
Monitor performance of you Rails applications

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Rails performance

App perf
Open source application performance monitoring tool with emphasis on ease of setup and use. Providing similar functionality like NewRelic/AppNeta/Skylight etc.
Stars: ✭ 353 (+2.32%)
Mutual labels:  rails, apm, performance-monitoring, performance
Opbeat Node
DEPRECATED - See Elastic APM instead: https://github.com/elastic/apm-agent-nodejs
Stars: ✭ 155 (-55.07%)
Mutual labels:  apm, performance-monitoring, performance
Scouter
Scouter is an open source APM (Application Performance Management) tool.
Stars: ✭ 1,792 (+419.42%)
Mutual labels:  apm, performance-monitoring, performance
Scout apm ruby
ScoutAPM Ruby Agent. Supports Rails, Sinatra, Grape, Rack, and many other frameworks
Stars: ✭ 137 (-60.29%)
Mutual labels:  ruby-on-rails, apm, performance-monitoring
Myperf4j
High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.
Stars: ✭ 2,281 (+561.16%)
Mutual labels:  apm, performance-monitoring, performance
Execution time
How fast is your code? See it directly in Rails console.
Stars: ✭ 67 (-80.58%)
Mutual labels:  rails, ruby-on-rails, performance
Vueonrails
💎 Rails gem with the power of Vue.js components
Stars: ✭ 250 (-27.54%)
Mutual labels:  rails, ruby-on-rails
uptrace
Open source APM: OpenTelemetry traces, metrics, and logs
Stars: ✭ 1,187 (+244.06%)
Mutual labels:  apm, performance-monitoring
lambda-memory-performance-benchmark
Performance and cost benchmark tool for AWS Lambda on memory sizes 📈⏱
Stars: ✭ 60 (-82.61%)
Mutual labels:  apm, performance-monitoring
appsignal-nodejs
🟩 AppSignal for Node.js
Stars: ✭ 17 (-95.07%)
Mutual labels:  apm, performance-monitoring
Email Dashboard
📪 An interactive emailing management service with scheduling, templating, tracking and A/B testing.
Stars: ✭ 194 (-43.77%)
Mutual labels:  rails, ruby-on-rails
xrayvision
Utilities and wrappers for using AWS X-Ray with Python
Stars: ✭ 23 (-93.33%)
Mutual labels:  apm, performance-monitoring
pryin
PryIn is an Application Performance Monitoring platform for your Elixir/Phoenix application.
Stars: ✭ 25 (-92.75%)
Mutual labels:  apm, performance-monitoring
Lamby
Simple Rails & AWS Lambda Integration 🐑🛤
Stars: ✭ 336 (-2.61%)
Mutual labels:  rails, ruby-on-rails
Brevidy
A video social network built with Ruby on Rails, HAML, Bootstrap, and jQuery.
Stars: ✭ 220 (-36.23%)
Mutual labels:  rails, ruby-on-rails
datadog-trace-agent
Datadog Trace Agent archive (pre-6.10.0)
Stars: ✭ 70 (-79.71%)
Mutual labels:  datadog, apm
Inject Some Sql
Have fun injecting SQL into a Ruby on Rails application!
Stars: ✭ 211 (-38.84%)
Mutual labels:  rails, ruby-on-rails
appsignal-ruby
🟥 AppSignal for Ruby gem
Stars: ✭ 140 (-59.42%)
Mutual labels:  apm, performance-monitoring
Elasticsearch Rails
Elasticsearch integrations for ActiveModel/Record and Ruby on Rails
Stars: ✭ 2,896 (+739.42%)
Mutual labels:  rails, ruby-on-rails
Query track
Find time-consuming database queries for ActiveRecord-based Rails Apps
Stars: ✭ 258 (-25.22%)
Mutual labels:  rails, performance

Rails Performance

Tests RailsJazz

A self-hosted tool to monitor the performance of your Ruby on Rails application.

This is simple and free alternative to the New Relic APM, Datadog or other similar services.

Demo

It allows you to track:

  • throughput report (see amount of RPM (requests per minute))
  • an average response time
  • the slowest controllers & actions
  • total duration of time spent per request, views rendering, DB
  • SQL queries, rendering logs in "Recent Requests" section
  • simple 500-crashes reports
  • track Sidekiq jobs performance
  • works with Rails 4.2+ (and probably 4.1, 4.0 too) and Ruby 2.2+

All data are stored in local Redis and not sent to any 3rd party servers.

Production

Gem is production-ready. At least on my 2 applications with ~800 unique users per day it works perfectly.

Just don't forget to protect performance dashboard with http basic auth or check of current_user.

Usage

1. Add gem to the Gemfile (in appropriate group if needed)
2. Start rails server
3. Make a few requests to your app
4. open localhost:3000/rails/performance
5. Tune the configuration and deploy to production

Default configulation is listed below. But you can overide it.

Create config/initializers/rails_performance.rb in your app:

RailsPerformance.setup do |config|
  config.redis    = Redis::Namespace.new("#{Rails.env}-rails-performance", redis: Redis.new)
  config.duration = 4.hours

  config.debug    = false # currently not used>
  config.enabled  = true

  # default path where to mount gem
  config.mount_at = '/rails/performance'

  # protect your Performance Dashboard with HTTP BASIC password
  config.http_basic_authentication_enabled   = false
  config.http_basic_authentication_user_name = 'rails_performance'
  config.http_basic_authentication_password  = 'password12'

  # if you need an additional rules to check user permissions
  config.verify_access_proc = proc { |controller| true }
  # for example when you have `current_user`
  # config.verify_access_proc = proc { |controller| controller.current_user && controller.current_user.admin? }
end if defined?(RailsPerformance)

Installation

Add this line to your application's Gemfile:

gem 'rails_performance'

# or

group :development, :production do
  gem 'rails_performance'
end

And then execute:

$ bundle

Create default configuration file:

$ rails generate rails_performance:install

Have a look at config/initializers/rails_performance.rb and adjust the configuration to your needs.

You must also have installed Redis server, because this gem is storing data into it.

After installation and configuration, start your Rails application, make a few requests, and open https://localhost:3000/rails/performance URL.

How it works

Schema

Limitations

  • it doesn't track params of POST/PUT requests
  • it doesn't track Redis/ElasticSearch or other apps
  • it can't compare historical data
  • depending on your load you may need to reduce time of for how long you store data, because all calculations are done in memory and it could take some time for high-load apps

Redis

Gem is using Redis. This is the only one dependency.

All information is stored into Redis. The default expiration time is set to config.duration from the configuration.

Development & Testing

Just clone the repo, setup dummy app (rails db:migrate).

After this:

  • rails s
  • rake test

Like a regular web development.

Please note that to simplify integration with other apps all CSS/JS are bundled inside, and delivered in body of the request. This is to avoid integration with assets pipeline or webpacker.

For UI changes you need to use Bulma CSS (https://bulma.io/documentation).

Why

The idea of this gem grew from curriosity how many RPM my app receiving per day. Later it evolutionated to something more powerful.

TODO

  • documentation in Readme?
  • capture stacktrace of 500 errors and show in side panel
  • time/zone config?
  • connected charts on dashboard, when zoom, when hover?
  • ability to zoom to see requests withing specific datetime range
  • better hints?
  • export to csv
  • better stats tooltip, do not show if nothing to show
  • dark mode toggle? save to the cookies?
  • integration with elastic search? or other?
  • monitor active job (sidekiq)?
  • better logo?
  • number of requests last 24 hours, hour, etc.
  • collect deprecation.rails
  • fix misspellings?
  • show "loading banner" until jquery is loaded?
  • better UI on smaller screens? Recent requests when URL's are long? Truncate with CSS?
  • rules for highlighting durations? how many ms to show warning, alert

Contributing

You are welcome to contribute. I've a big list of TODO.

Big thanks to contributors

License

The gem is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].