Module: RailsPerformance
- Defined in:
- lib/rails_performance.rb,
lib/rails_performance/utils.rb,
lib/rails_performance/engine.rb,
lib/rails_performance/version.rb,
lib/rails_performance/data_source.rb,
lib/rails_performance/gems/rake_ext.rb,
lib/rails_performance/gems/grape_ext.rb,
lib/rails_performance/gems/custom_ext.rb,
lib/rails_performance/extensions/trace.rb,
lib/rails_performance/extensions/trace.rb,
lib/rails_performance/gems/sidekiq_ext.rb,
lib/rails_performance/rails/middleware.rb,
lib/rails_performance/models/collection.rb,
lib/rails_performance/models/base_record.rb,
lib/rails_performance/models/rake_record.rb,
lib/rails_performance/models/grape_record.rb,
lib/rails_performance/models/trace_record.rb,
lib/rails_performance/rails/query_builder.rb,
lib/rails_performance/reports/base_report.rb,
lib/rails_performance/gems/delayed_job_ext.rb,
lib/rails_performance/models/custom_record.rb,
lib/rails_performance/reports/crash_report.rb,
lib/rails_performance/reports/trace_report.rb,
lib/rails_performance/models/request_record.rb,
lib/rails_performance/models/sidekiq_record.rb,
lib/rails_performance/thread/current_request.rb,
lib/rails_performance/reports/requests_report.rb,
lib/rails_performance/reports/breakdown_report.rb,
lib/rails_performance/models/delayed_job_record.rb,
lib/rails_performance/reports/throughput_report.rb,
app/controllers/rails_performance/base_controller.rb,
lib/rails_performance/instrument/metrics_collector.rb,
lib/rails_performance/reports/response_time_report.rb,
lib/rails_performance/reports/slow_requests_report.rb,
lib/rails_performance/reports/recent_requests_report.rb,
app/helpers/rails_performance/rails_performance_helper.rb,
app/controllers/rails_performance/rails_performance_controller.rb
Defined Under Namespace
Modules: Extensions, Gems, Instrument, Models, Rails, RailsPerformanceHelper, Reports
Classes: BaseController, CurrentRequest, DataSource, Engine, InstallGenerator, RailsPerformanceController, Utils
Constant Summary
collapse
- FORMAT =
"%Y%m%dT%H%M"
- VERSION =
'1.2.2'
- SCHEMA =
'1.0.1'
- @@redis =
Redis::Namespace.new("{#{::Rails.env}-rails-performance}", redis: Redis.new)
- @@duration =
4.hours
- @@recent_requests_time_window =
60.minutes
- @@recent_requests_limit =
500
- @@slow_requests_time_window =
4.hours
- @@slow_requests_threshold =
500
- @@debug =
false
- @@enabled =
true
- @@mount_at =
"/rails/performance"
- @@http_basic_authentication_enabled =
false
- @@http_basic_authentication_user_name =
'rails_performance'
- @@http_basic_authentication_password =
'password12'
- @@verify_access_proc =
proc { |controller| true }
- @@ignored_endpoints =
[]
- @@skip =
false
- @@home_link =
'/'
- @@skipable_rake_tasks =
[]
- @@custom_data_proc =
nil
- @@include_rake_tasks =
false
- @@include_custom_events =
true
Class Method Summary
collapse
Class Method Details
.ignored_endpoints=(endpoints) ⇒ Object
81
82
83
|
# File 'lib/rails_performance.rb', line 81
def RailsPerformance.ignored_endpoints=(endpoints)
@@ignored_endpoints = Set.new(endpoints)
end
|
.log(message) ⇒ Object
114
115
116
117
118
119
120
121
122
123
|
# File 'lib/rails_performance.rb', line 114
def RailsPerformance.log(message)
return unless RailsPerformance.debug
if ::Rails.logger
::Rails.logger.debug(message)
else
puts(message)
end
end
|
.setup {|_self| ... } ⇒ Object
110
111
112
|
# File 'lib/rails_performance.rb', line 110
def RailsPerformance.setup
yield(self)
end
|