Sha256: ca763c65028ad183fcfe6f8ef14fb579d3a9435818abdbc342889ccc15366965

Contents?: true

Size: 680 Bytes

Versions: 8

Compression:

Stored size: 680 Bytes

Contents

# frozen_string_literal: true

module Datadog
  module Profiling
    # Entity class used to represent an entry in a stack trace.
    # Its fields are a simplified struct version of `Thread::Backtrace::Location`.
    class BacktraceLocation
      attr_reader \
        :base_label,
        :lineno,
        :path,
        :hash

      def initialize(
        base_label,
        lineno,
        path
      )
        @base_label = base_label
        @lineno = lineno
        @path = path
        @hash = [base_label, lineno, path].hash
      end

      def ==(other)
        hash == other.hash
      end

      def eql?(other)
        hash == other.hash
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ddtrace-1.14.0 lib/datadog/profiling/backtrace_location.rb
ddtrace-1.13.1 lib/datadog/profiling/backtrace_location.rb
ddtrace-1.13.0 lib/datadog/profiling/backtrace_location.rb
ddtrace-1.12.1 lib/datadog/profiling/backtrace_location.rb
ddtrace-1.12.0 lib/datadog/profiling/backtrace_location.rb
ddtrace-1.11.1 lib/datadog/profiling/backtrace_location.rb
ddtrace-1.11.0 lib/datadog/profiling/backtrace_location.rb
ddtrace-1.11.0.beta1 lib/datadog/profiling/backtrace_location.rb