Method: NewRelic::Agent::Threading::BacktraceNode#dump_string

Defined in:
lib/new_relic/agent/threading/backtrace_node.rb

#dump_string(indent = 0) ⇒ Object

[View source]

116
117
118
119
120
121
122
123
124
# File 'lib/new_relic/agent/threading/backtrace_node.rb', line 116

def dump_string(indent = 0)
  @file, @method, @line_no = parse_backtrace_frame(@raw_line)
  indentation = ' ' * indent
  result = +"#{indentation}#<BacktraceNode:#{object_id} ) + \
                      [#{@runnable_count}] #{@file}:#{@line_no} in #{@method}>"
  child_results = @children.map { |c| c.dump_string(indent + 2) }.join("\n")
  result << "\n" unless child_results.empty?
  result << child_results
end