Sha256: 2cf2e547dbada880ec2c883ae9712c598a86df45e5bc67ee311f2285cb0310c9
Contents?: true
Size: 591 Bytes
Versions: 6
Compression:
Stored size: 591 Bytes
Contents
MetricFu.metrics_require { 'hotspots/hotspot_analyzer' } module MetricFu class HotspotsGenerator < Generator def self.metric :hotspots end def initialize(options={}) super end def emit # no-op end def analyze analyzer = MetricFu::HotspotAnalyzer.new(MetricFu.result.result_hash) @hotspots = analyzer.hotspots end def to_h result = {:hotspots => {}} @hotspots.each do |granularity, hotspots| result[:hotspots][granularity.to_s] = hotspots.map(&:to_hash) end result end end end
Version data entries
6 entries across 6 versions & 1 rubygems