Sha256: e15a6bfe5ffb1aaddd0496899eb97d8580365211da6391cf004b60db78e5f062

Contents?: true

Size: 1.32 KB

Versions: 7

Compression:

Stored size: 1.32 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.

module NewRelic
  autoload :MetricParser, 'new_relic/metric_parser'
  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 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

7 entries across 7 versions & 1 rubygems

Version Path
newrelic_rpm-4.0.0.332 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.18.1.330 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.18.0.329 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.17.2.327 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.17.1.326 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.17.0.325 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb
newrelic_rpm-3.16.3.323 vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb