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, #handle_exception_in_explain, #obfuscated_sql, #params, #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.
256 257 258 259 260 261 262 |
# File 'lib/new_relic/transaction_sample.rb', line 256 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
264 265 266 267 268 |
# File 'lib/new_relic/transaction_sample.rb', line 264 def add_segments(segments) segments.collect do |segment| SummarySegment.new(segment) end.each {|segment| add_called_segment(segment)} end |