Class: MetricFu::HotspotAnalyzer
- Inherits:
-
Object
- Object
- MetricFu::HotspotAnalyzer
- Defined in:
- lib/metric_fu/metrics/hotspots/hotspot_analyzer.rb
Constant Summary collapse
- COMMON_COLUMNS =
%w{metric}
- GRANULARITIES =
%w{file_path class_name method_name}
Instance Method Summary collapse
- #analyzed_problems ⇒ Object
- #hotspots ⇒ Object
-
#initialize(result_hash) ⇒ HotspotAnalyzer
constructor
A new instance of HotspotAnalyzer.
- #tool_analyzers ⇒ Object
Constructor Details
#initialize(result_hash) ⇒ HotspotAnalyzer
Returns a new instance of HotspotAnalyzer.
20 21 22 23 24 25 |
# File 'lib/metric_fu/metrics/hotspots/hotspot_analyzer.rb', line 20 def initialize(result_hash) # we can't depend on the result # returning a parsed yaml file as a hash? result_hash = YAML::load(result_hash) if result_hash.is_a?(String) setup(result_hash) end |
Instance Method Details
#analyzed_problems ⇒ Object
31 32 33 |
# File 'lib/metric_fu/metrics/hotspots/hotspot_analyzer.rb', line 31 def analyzed_problems @analyzed_problems = MetricFu::HotspotAnalyzedProblems.new(@rankings, @analyzer_tables) end |
#hotspots ⇒ Object
27 28 29 |
# File 'lib/metric_fu/metrics/hotspots/hotspot_analyzer.rb', line 27 def hotspots analyzed_problems.worst_items end |