Class: ScoutRailsProxy::StackItem
- Inherits:
-
Object
- Object
- ScoutRailsProxy::StackItem
- Defined in:
- lib/scout_rails_proxy/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.
5 6 7 8 9 |
# File 'lib/scout_rails_proxy/stack_item.rb', line 5 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.
2 3 4 |
# File 'lib/scout_rails_proxy/stack_item.rb', line 2 def children_time @children_time end |
#metric_name ⇒ Object (readonly)
Returns the value of attribute metric_name.
3 4 5 |
# File 'lib/scout_rails_proxy/stack_item.rb', line 3 def metric_name @metric_name end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
3 4 5 |
# File 'lib/scout_rails_proxy/stack_item.rb', line 3 def start_time @start_time end |
Instance Method Details
#==(o) ⇒ Object
11 12 13 |
# File 'lib/scout_rails_proxy/stack_item.rb', line 11 def ==(o) self.eql?(o) end |
#eql?(o) ⇒ Boolean
15 16 17 |
# File 'lib/scout_rails_proxy/stack_item.rb', line 15 def eql?(o) self.class == o.class && metric_name.eql?(o.metric_name) end |