Sha256: b29c7d59d56ea4e98f1eebc34d5cbbe6c274e5015df20bb73c91bc3111c4e8e1

Contents?: true

Size: 802 Bytes

Versions: 100

Compression:

Stored size: 802 Bytes

Contents

require 'new_relic/metric_parser'
module NewRelic
  module MetricParser
    class ControllerCPU < NewRelic::MetricParser::MetricParser

      def is_controller_cpu?; true; end

      def controller_name
        segments[1..-2].join('/').camelize+"Controller"
      end

      def action_name
        segments[-1]
      end

      def developer_name
        "#{controller_name}##{action_name}"
      end

      def base_metric_name
        "Controller/" + segments[1..-1].join('/')
      end

      def short_name
        # standard controller actions
        if segments.length > 1
          url
        else
          'All Controller Actions'
        end
      end

      def url
        '/' + segments[1..-1].join('/')
      end

      def call_rate_suffix
        'rpm'
      end

    end
  end
end

Version data entries

100 entries across 100 versions & 5 rubygems

Version Path
wd_newrelic_rpm-3.5.8 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
sundawg_newrelic_rpm-3.5.8.2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
sundawg_newrelic_rpm-3.5.8.1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.8.72 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.8.70 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.8.64.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.7.59 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.7.59.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.7.58.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
wd_newrelic_rpm-3.5.6 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.7.57.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.6.55 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.6.48.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.6.46.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.6.42.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.5.39.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
wd_newrelic_rpm-3.5.5 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.5.38 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.5.540.dev vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb
newrelic_rpm-3.5.4.35.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb