Class: Vivarium::TreeRenderer::Span

Inherits:
Struct
  • Object
show all
Defined in:
lib/vivarium/tree_renderer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descendant_pidsObject

Returns the value of attribute descendant_pids

Returns:

  • (Object)

    the current value of descendant_pids



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def descendant_pids
  @descendant_pids
end

#eventsObject

Returns the value of attribute events

Returns:

  • (Object)

    the current value of events



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def events
  @events
end

#exit_kindObject

Returns the value of attribute exit_kind

Returns:

  • (Object)

    the current value of exit_kind



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def exit_kind
  @exit_kind
end

#file_idObject

Returns the value of attribute file_id

Returns:

  • (Object)

    the current value of file_id



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def file_id
  @file_id
end

#linenoObject

Returns the value of attribute lineno

Returns:

  • (Object)

    the current value of lineno



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def lineno
  @lineno
end

#method_idObject

Returns the value of attribute method_id

Returns:

  • (Object)

    the current value of method_id



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def method_id
  @method_id
end

#raisedObject

Returns the value of attribute raised

Returns:

  • (Object)

    the current value of raised



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def raised
  @raised
end

#start_ktimeObject

Returns the value of attribute start_ktime

Returns:

  • (Object)

    the current value of start_ktime



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def start_ktime
  @start_ktime
end

#stop_ktimeObject

Returns the value of attribute stop_ktime

Returns:

  • (Object)

    the current value of stop_ktime



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def stop_ktime
  @stop_ktime
end

#syntheticObject

Returns the value of attribute synthetic

Returns:

  • (Object)

    the current value of synthetic



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def synthetic
  @synthetic
end

#tidObject

Returns the value of attribute tid

Returns:

  • (Object)

    the current value of tid



25
26
27
# File 'lib/vivarium/tree_renderer.rb', line 25

def tid
  @tid
end

Instance Method Details

#duration_nsObject



30
31
32
33
34
# File 'lib/vivarium/tree_renderer.rb', line 30

def duration_ns
  return nil unless stop_ktime && start_ktime

  stop_ktime - start_ktime
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/vivarium/tree_renderer.rb', line 42

def eql?(other)
  equal?(other)
end

#hashObject

Span is mutable (stop_ktime, events, descendant_pids are written after creation). Use object identity for Hash/Set so keys remain stable across mutations.



38
39
40
# File 'lib/vivarium/tree_renderer.rb', line 38

def hash
  object_id
end