Class: MetricFu::HotspotAnalyzer

Inherits:
Object
  • Object
show all
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

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_problemsObject



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

#hotspotsObject



27
28
29
# File 'lib/metric_fu/metrics/hotspots/hotspot_analyzer.rb', line 27

def hotspots
  analyzed_problems.worst_items
end

#tool_analyzersObject



16
17
18
# File 'lib/metric_fu/metrics/hotspots/hotspot_analyzer.rb', line 16

def tool_analyzers
  MetricFu::Hotspot.analyzers
end