Class: MetricFu::HotspotsGenerator
Instance Attribute Summary
Attributes inherited from Generator
#options, #result, #template
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Generator
#generate_result, generators, get_generator, #metric, #metric_config, metric_directory, #metric_directory, not_implemented, #remove_excluded_files, #round_to_tenths, #run!, #silence_streams
Constructor Details
Returns a new instance of HotspotsGenerator.
8
9
10
11
12
13
|
# File 'lib/metric_fu/metrics/hotspots/generator.rb', line 8
def initialize(options = {})
MetricFu::Metric.enabled_metrics.each do |metric|
require_hotspot(metric.name)
end
super
end
|
Class Method Details
.metric ⇒ Object
4
5
6
|
# File 'lib/metric_fu/metrics/hotspots/generator.rb', line 4
def self.metric
:hotspots
end
|
Instance Method Details
#emit ⇒ Object
15
16
17
|
# File 'lib/metric_fu/metrics/hotspots/generator.rb', line 15
def emit
end
|
#to_h ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/metric_fu/metrics/hotspots/generator.rb', line 24
def to_h
result = { hotspots: {} }
@hotspots.each do |granularity, hotspots|
result[:hotspots][granularity.to_s] = hotspots.map(&:to_hash)
end
result
end
|