class Benchin::Wrap::Report::Node::Virtual

Virtual Node is a node without ability to track time in.

It is designed to be used as container for nested nodes.

@api private

Public Instance Methods

add_time() click to toggle source
# File lib/benchin/wrap/report/node.rb, line 60
def add_time
  raise 'Cannot add time to a virtual node'
end
self_seconds() click to toggle source
# File lib/benchin/wrap/report/node.rb, line 56
def self_seconds
  0.0
end
to_h() click to toggle source
# 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() click to toggle source
# File lib/benchin/wrap/report/node.rb, line 52
def total_seconds
  child_seconds
end