def before_perform_request(request)
      # log
      if !quiet?
        msg = if request.method != 'get'
          "req #{request.uri} (#{request.method})"
        else
          "req #{request.uri}"
        end
        msg = "#{msg} => #{request.proxy}" if request.proxy
        $stderr.puts msg
      end

      # rate limit
      sleep = (request_tm + runtime_options.rate_limit) - Time.now
      sleep(sleep) if sleep > 0
      @request_tm = Time.now
    end
def before_perform_request(request)
      # log
      if !quiet?
        msg = if request.method != 'get'
          "req #{request.uri} (#{request.method})"
        else
          "req #{request.uri}"
        end
        msg = "#{msg} => #{request.proxy}" if request.proxy
        $stderr.puts msg
      end

      # rate limit
      sleep = (request_tm + runtime_options.rate_limit) - Time.now
      sleep(sleep) if sleep > 0
      @request_tm = Time.now
    end
helpers