def initialize(command_arguments={})
@command_arguments = command_arguments
@profile_id = command_arguments.fetch('profile_id', -1)
@duration = command_arguments.fetch('duration', 120)
@sample_period = command_arguments.fetch('sample_period', 0.1)
@profile_agent_code = command_arguments.fetch('profile_agent_code', false)
@xray_id = command_arguments.fetch('x_ray_id', nil)
@finished = false
@traces = {
:agent => BacktraceRoot.new,
:background => BacktraceRoot.new,
:other => BacktraceRoot.new,
:request => BacktraceRoot.new
}
@poll_count = 0
@backtrace_count = 0
@failure_count = 0
@unique_threads = []
@created_at = Time.now
end