Class: NewRelic::TransactionSample::SummarySegment
- Defined in:
- lib/new_relic/transaction_sample.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, #end_trace, #exclusive_duration, #explain_sql, #find_segment, from_json, #handle_exception_in_explain, #obfuscated_sql, #params, #path_string, #to_debug_str, #to_json, #to_s, #to_s_compact, #truncate
Constructor Details
#initialize(segment) ⇒ SummarySegment
Returns a new instance of SummarySegment.
283 284 285 286 287 288 289 |
# File 'lib/new_relic/transaction_sample.rb', line 283 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
291 292 293 294 295 |
# File 'lib/new_relic/transaction_sample.rb', line 291 def add_segments(segments) segments.collect do |segment| SummarySegment.new(segment) end.each {|segment| add_called_segment(segment)} end |