Sha256: 507e656926f04fb4ef179e7a7b4eec150bdb94a0b01146f844261edf756bc6e4

Contents?: true

Size: 1.38 KB

Versions: 66

Compression:

Stored size: 1.38 KB

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

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
        'Memcache'
      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

66 entries across 66 versions & 2 rubygems

Version Path
newrelic_rpm-3.7.0.177 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.7.0.174.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.9.171 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.8.168 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.8.164 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.7.159 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.7.159.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.7.152 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.6.147 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.5.130 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.4.122 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.4.113.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.3.111 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.3.106 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.3.105.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.3.104 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.3.103.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.2.96 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.2.90.beta vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.6.1.88 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb