class Rack::RubyProf

def profiling_options

def profiling_options
  result = {}
  result[:measure_mode] = @measure_mode
  result[:track_allocations] = @track_allocations
  result[:exclude_common] = @exclude_common
  if @ignore_existing_threads
    result[:exclude_threads] = Thread.list.select {|thread| thread != Thread.current}
  end
  if @request_thread_only
    result[:include_threads] = [Thread.current]
  end
  result
end