Sha256: 74b6799253960512070c147c5facbcc764e9fb42ac6f3f7f8bf0b9b4202b4170

Contents?: true

Size: 1.22 KB

Versions: 20

Compression:

Stored size: 1.22 KB

Contents

require 'new_relic/metric_parser'
module NewRelic
  module MetricParser
    class MemCache < NewRelic::MetricParser::MetricParser
      def is_memcache?; true; end

      # for MemCache metrics, the short name is actually
      # the full name
      def short_name
        name
      end
      def developer_name
        "MemCache #{segments[1..-1].join '/'}"
      end

      def all?
        segments[1].index('all') == 0
      end
      def operation
        all? ? 'All Operations' : segments[1]
      end
      def legend_name
        case segments[1]
        when 'allWeb'
          "MemCache"
        when 'allOther'
          "Non-web MemCache"
        else
          "MemCache #{operation} operations"
        end
      end
      def tooltip_name
        case segments[1]
        when 'allWeb'
          "MemCache calls from web transactions"
        when 'allOther'
          "MemCache calls from non-web transactions"
        else
          "MemCache #{operation} operations"
        end

      end
      def developer_name
        case segments[1]
        when 'allWeb'
          "Web MemCache"
        when 'allOther'
          "Non-web MemCache"
        else
          "MemCache #{operation}"
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
newrelic_rpm-3.1.2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.2.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.2.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.1.beta3 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.1.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.1.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
ghazel-newrelic_rpm-3.1.0.1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.0 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.0.beta5 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.0.beta4 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.0.djlogging2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.0.djlogging vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.0.beta3 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.0.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.0.1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.1.0.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.0.0 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.0.0.beta2 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.0.0.beta1 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb