Class: RailsPulse::Analysis::BaseAnalyzer
- Inherits:
-
Object
- Object
- RailsPulse::Analysis::BaseAnalyzer
- Defined in:
- app/services/rails_pulse/analysis/base_analyzer.rb
Direct Known Subclasses
BacktraceAnalyzer, ExplainPlanAnalyzer, IndexRecommendationEngine, NPlusOneDetector, QueryCharacteristicsAnalyzer
Constant Summary collapse
- RECENT_OPERATIONS_WINDOW =
48.hours
Instance Attribute Summary collapse
-
#operations ⇒ Object
readonly
Returns the value of attribute operations.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#analyze ⇒ Object
Each analyzer must implement this method.
-
#initialize(query, operations = []) ⇒ BaseAnalyzer
constructor
A new instance of BaseAnalyzer.
Constructor Details
#initialize(query, operations = []) ⇒ BaseAnalyzer
Returns a new instance of BaseAnalyzer.
10 11 12 13 |
# File 'app/services/rails_pulse/analysis/base_analyzer.rb', line 10 def initialize(query, operations = []) @query = query @operations = Array(operations) end |
Instance Attribute Details
#operations ⇒ Object (readonly)
Returns the value of attribute operations.
8 9 10 |
# File 'app/services/rails_pulse/analysis/base_analyzer.rb', line 8 def operations @operations end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
8 9 10 |
# File 'app/services/rails_pulse/analysis/base_analyzer.rb', line 8 def query @query end |
Instance Method Details
#analyze ⇒ Object
Each analyzer must implement this method
16 17 18 |
# File 'app/services/rails_pulse/analysis/base_analyzer.rb', line 16 def analyze raise NotImplementedError, "#{self.class} must implement #analyze" end |