Class: Datadog::Profiling::BacktraceLocation
- Inherits:
-
Object
- Object
- Datadog::Profiling::BacktraceLocation
- Defined in:
- lib/ddtrace/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.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ddtrace/profiling/backtrace_location.rb', line 13 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.
7 8 9 |
# File 'lib/ddtrace/profiling/backtrace_location.rb', line 7 def base_label @base_label end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
7 8 9 |
# File 'lib/ddtrace/profiling/backtrace_location.rb', line 7 def hash @hash end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
7 8 9 |
# File 'lib/ddtrace/profiling/backtrace_location.rb', line 7 def lineno @lineno end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/ddtrace/profiling/backtrace_location.rb', line 7 def path @path end |
Instance Method Details
#==(other) ⇒ Object
24 25 26 |
# File 'lib/ddtrace/profiling/backtrace_location.rb', line 24 def ==(other) hash == other.hash end |
#eql?(other) ⇒ Boolean
28 29 30 |
# File 'lib/ddtrace/profiling/backtrace_location.rb', line 28 def eql?(other) hash == other.hash end |