Class: NewRelic::TransactionSample::SummarySegment
- Defined in:
- lib/new_relic/transaction_sample/summary_segment.rb
Instance Attribute Summary
Attributes inherited from Segment
#entry_timestamp, #exit_timestamp, #metric_name, #parent_segment, #segment_id
Instance Method Summary collapse
- #add_segments(segments) ⇒ Object
-
#initialize(segment) ⇒ SummarySegment
constructor
A new instance of SummarySegment.
Methods inherited from Segment
#[], #[]=, #add_called_segment, #called_segments, #called_segments=, #count_segments, #duration, #each_segment, #each_segment_with_nest_tracking, #end_trace, #exclusive_duration, #explain_sql, #find_segment, #obfuscated_sql, #params, #params=, #path_string, #to_array, #to_debug_str, #to_json, #to_s, #to_s_compact
Methods included from Coerce
#float, #int, #log_failure, #string
Constructor Details
#initialize(segment) ⇒ SummarySegment
Returns a new instance of SummarySegment.
10 11 12 13 14 15 16 |
# File 'lib/new_relic/transaction_sample/summary_segment.rb', line 10 def initialize(segment) super segment., segment.metric_name, nil add_segments segment.called_segments end_trace segment. end |
Instance Method Details
#add_segments(segments) ⇒ Object
18 19 20 21 22 |
# File 'lib/new_relic/transaction_sample/summary_segment.rb', line 18 def add_segments(segments) segments.collect do |segment| SummarySegment.new(segment) end.each {|segment| add_called_segment(segment)} end |