Class: Datadog::Profiling::BacktraceLocation
- Inherits:
-
Object
- Object
- Datadog::Profiling::BacktraceLocation
- Defined in:
- lib/datadog/profiling/backtrace_location.rb
Overview
Entity class used to represent an entry in a stack trace. Its fields are a simplified struct version of ‘Thread::Backtrace::Location`.
Instance Attribute Summary collapse
-
#base_label ⇒ Object
readonly
Returns the value of attribute base_label.
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
-
#initialize(base_label, lineno, path) ⇒ BacktraceLocation
constructor
A new instance of BacktraceLocation.
Constructor Details
#initialize(base_label, lineno, path) ⇒ BacktraceLocation
Returns a new instance of BacktraceLocation.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/datadog/profiling/backtrace_location.rb', line 12 def initialize( base_label, lineno, path ) @base_label = base_label @lineno = lineno @path = path @hash = [base_label, lineno, path].hash end |
Instance Attribute Details
#base_label ⇒ Object (readonly)
Returns the value of attribute base_label.
6 7 8 |
# File 'lib/datadog/profiling/backtrace_location.rb', line 6 def base_label @base_label end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
6 7 8 |
# File 'lib/datadog/profiling/backtrace_location.rb', line 6 def hash @hash end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
6 7 8 |
# File 'lib/datadog/profiling/backtrace_location.rb', line 6 def lineno @lineno end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/datadog/profiling/backtrace_location.rb', line 6 def path @path end |
Instance Method Details
#==(other) ⇒ Object
23 24 25 |
# File 'lib/datadog/profiling/backtrace_location.rb', line 23 def ==(other) hash == other.hash end |
#eql?(other) ⇒ Boolean
27 28 29 |
# File 'lib/datadog/profiling/backtrace_location.rb', line 27 def eql?(other) hash == other.hash end |