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



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def descendant_pids
  @descendant_pids
end

#eventsObject

Returns the value of attribute events

Returns:

  • (Object)

    the current value of events



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def events
  @events
end

#exit_kindObject

Returns the value of attribute exit_kind

Returns:

  • (Object)

    the current value of exit_kind



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def exit_kind
  @exit_kind
end

#file_idObject

Returns the value of attribute file_id

Returns:

  • (Object)

    the current value of file_id



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def file_id
  @file_id
end

#linenoObject

Returns the value of attribute lineno

Returns:

  • (Object)

    the current value of lineno



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def lineno
  @lineno
end

#method_idObject

Returns the value of attribute method_id

Returns:

  • (Object)

    the current value of method_id



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def method_id
  @method_id
end

#raisedObject

Returns the value of attribute raised

Returns:

  • (Object)

    the current value of raised



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def raised
  @raised
end

#start_ktimeObject

Returns the value of attribute start_ktime

Returns:

  • (Object)

    the current value of start_ktime



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def start_ktime
  @start_ktime
end

#stop_ktimeObject

Returns the value of attribute stop_ktime

Returns:

  • (Object)

    the current value of stop_ktime



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def stop_ktime
  @stop_ktime
end

#syntheticObject

Returns the value of attribute synthetic

Returns:

  • (Object)

    the current value of synthetic



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def synthetic
  @synthetic
end

#tidObject

Returns the value of attribute tid

Returns:

  • (Object)

    the current value of tid



29
30
31
# File 'lib/vivarium/tree_renderer.rb', line 29

def tid
  @tid
end

Instance Method Details

#duration_nsObject



34
35
36
37
38
# File 'lib/vivarium/tree_renderer.rb', line 34

def duration_ns
  return nil unless stop_ktime && start_ktime

  stop_ktime - start_ktime
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/vivarium/tree_renderer.rb', line 46

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.



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

def hash
  object_id
end