Class: Benchin::Wrap::Report::Node::Virtual Private
- Inherits:
-
Benchin::Wrap::Report::Node
- Object
- Benchin::Wrap::Report::Node
- Benchin::Wrap::Report::Node::Virtual
- Defined in:
- lib/benchin/wrap/report/node.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Virtual Node is a node without ability to track time in.
It is designed to be used as container for nested nodes.
Instance Attribute Summary
Attributes inherited from Benchin::Wrap::Report::Node
Instance Method Summary collapse
- #add_time ⇒ Object private
- #self_seconds ⇒ Object private
- #to_h ⇒ Object private
- #total_seconds ⇒ Object private
Methods inherited from Benchin::Wrap::Report::Node
#add_call, #child_seconds, #initialize
Constructor Details
This class inherits a constructor from Benchin::Wrap::Report::Node
Instance Method Details
#add_time ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
60 61 62 |
# File 'lib/benchin/wrap/report/node.rb', line 60 def add_time raise 'Cannot add time to a virtual node' end |
#self_seconds ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
56 57 58 |
# File 'lib/benchin/wrap/report/node.rb', line 56 def self_seconds 0.0 end |
#to_h ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
64 65 66 67 68 69 70 |
# File 'lib/benchin/wrap/report/node.rb', line 64 def to_h { name: name, total_seconds: total_seconds, nested: nested.values.map(&:to_h) } end |
#total_seconds ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
52 53 54 |
# File 'lib/benchin/wrap/report/node.rb', line 52 def total_seconds child_seconds end |