Method: NewRelic::Agent::Threading::BacktraceService#harvest

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

#harvest(transaction_name) ⇒ Object


102
103
104
105
106
107
108
109
110
111
# File 'lib/new_relic/agent/threading/backtrace_service.rb', line 102

def harvest(transaction_name)
  @lock.synchronize do
    if @profiles[transaction_name]
      profile = @profiles.delete(transaction_name)
      profile.finished_at = Process.clock_gettime(Process::CLOCK_REALTIME)
      @profiles[transaction_name] = ThreadProfile.new(profile.command_arguments)
      profile
    end
  end
end