Class: NewRelic::MetricParser::ControllerCPU
Constant Summary
SEPARATOR
Instance Attribute Summary
#name
Instance Method Summary
collapse
#apdex_metric_path, #category, for_metric_named, #initialize, #is_controller?, #is_transaction?, #last_segment, #legend_name, #method_missing, parse, #pie_chart_label, #segment_0, #segment_1, #segment_2, #segment_3, #segment_4, #segment_5, #segments, #summary_metrics, #tooltip_name
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class NewRelic::MetricParser
Instance Method Details
#action_name ⇒ Object
9
10
11
|
# File 'lib/new_relic/metric_parser/controller_cpu.rb', line 9
def action_name
segments[-1]
end
|
#base_metric_name ⇒ Object
17
18
19
|
# File 'lib/new_relic/metric_parser/controller_cpu.rb', line 17
def base_metric_name
"Controller/" + segments[1..-1].join('/')
end
|
#call_rate_suffix ⇒ Object
34
35
36
|
# File 'lib/new_relic/metric_parser/controller_cpu.rb', line 34
def call_rate_suffix
'rpm'
end
|
#controller_name ⇒ Object
5
6
7
|
# File 'lib/new_relic/metric_parser/controller_cpu.rb', line 5
def controller_name
segments[1..-2].join('/').camelize+"Controller"
end
|
#developer_name ⇒ Object
13
14
15
|
# File 'lib/new_relic/metric_parser/controller_cpu.rb', line 13
def developer_name
"#{controller_name}##{action_name}"
end
|
#is_controller_cpu? ⇒ Boolean
3
|
# File 'lib/new_relic/metric_parser/controller_cpu.rb', line 3
def is_controller_cpu?; true; end
|
#short_name ⇒ Object
21
22
23
24
25
26
27
28
|
# File 'lib/new_relic/metric_parser/controller_cpu.rb', line 21
def short_name
if segments.length > 1
url
else
'All Controller Actions'
end
end
|
#url ⇒ Object
30
31
32
|
# File 'lib/new_relic/metric_parser/controller_cpu.rb', line 30
def url
'/' + segments[1..-1].join('/')
end
|