Module: TemplateStreaming::NewRelic::Segment

Defined in:
lib/template_streaming/new_relic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#called_segmentsObject (readonly)

Returns the value of attribute called_segments.



527
528
529
# File 'lib/template_streaming/new_relic.rb', line 527

def called_segments
  @called_segments
end

#exit_timestamp=(value) ⇒ Object (writeonly)

Sets the attribute exit_timestamp

Parameters:

  • value

    the value to set the attribute exit_timestamp to.



528
529
530
# File 'lib/template_streaming/new_relic.rb', line 528

def exit_timestamp=(value)
  @exit_timestamp = value
end

Instance Method Details

#bump_by(delta) ⇒ Object

Increment the timestamps by the given delta.



533
534
535
536
537
538
539
540
541
# File 'lib/template_streaming/new_relic.rb', line 533

def bump_by(delta)
  @entry_timestamp += delta
  @exit_timestamp += delta
  if @called_segments
    @called_segments.each do |segment|
      segment.bump_by(delta)
    end
  end
end