Sha256: dd98d9f3863c91e6a963b23a659e528815fb96fed8bbdcf200290daea637acf7

Contents?: true

Size: 346 Bytes

Versions: 4

Compression:

Stored size: 346 Bytes

Contents

module HeimdallApm
  # Metric name used in visitor's metrics hash
  #
  class MetricName
    attr_reader :type, :name, :scope

    def initialize(type, name, scope = nil)
      @type   = type
      @name   = name
      @scope  = scope
    end

    def hash
      h = type.hash ^ name.hash
      h ^= scope.hash if scope
      h
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
heimdall_apm-0.1.3 lib/heimdall_apm/metric_name.rb
heimdall_apm-0.1.2 lib/heimdall_apm/metric_name.rb
heimdall_apm-0.1.1 lib/heimdall_apm/metric_name.rb
heimdall_apm-0.1.0 lib/heimdall_apm/metric_name.rb