Class: ScoutApm::StackItem
- Inherits:
-
Object
- Object
- ScoutApm::StackItem
- Defined in:
- lib/scout_apm/stack_item.rb
Instance Attribute Summary collapse
-
#children_time ⇒ Object
Returns the value of attribute children_time.
-
#metric_name ⇒ Object
readonly
Returns the value of attribute metric_name.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
Instance Method Summary collapse
- #==(o) ⇒ Object
- #eql?(o) ⇒ Boolean
-
#initialize(metric_name) ⇒ StackItem
constructor
A new instance of StackItem.
Constructor Details
#initialize(metric_name) ⇒ StackItem
Returns a new instance of StackItem.
6 7 8 9 10 |
# File 'lib/scout_apm/stack_item.rb', line 6 def initialize(metric_name) @metric_name = metric_name @start_time = Time.now @children_time = 0 end |
Instance Attribute Details
#children_time ⇒ Object
Returns the value of attribute children_time.
3 4 5 |
# File 'lib/scout_apm/stack_item.rb', line 3 def children_time @children_time end |
#metric_name ⇒ Object (readonly)
Returns the value of attribute metric_name.
4 5 6 |
# File 'lib/scout_apm/stack_item.rb', line 4 def metric_name @metric_name end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
4 5 6 |
# File 'lib/scout_apm/stack_item.rb', line 4 def start_time @start_time end |
Instance Method Details
#==(o) ⇒ Object
12 13 14 |
# File 'lib/scout_apm/stack_item.rb', line 12 def ==(o) self.eql?(o) end |
#eql?(o) ⇒ Boolean
16 17 18 |
# File 'lib/scout_apm/stack_item.rb', line 16 def eql?(o) self.class == o.class && metric_name.eql?(o.metric_name) end |