'Update the rate with the current value and send ``request_rate``
number of new requests.
This function expects to be called from a ``LoopingCall`` with a 1
second interval.  Normally, count == 1 and this gets runs once.  If
this function takes longer than the loop interval (1 second) it will
miss a call and will subsequently be called with count > 1 to allow it
to catch up.
:param count: The number of seconds passed since the last time
``_request_and_measure`` was called.
:return Deferred[None]: LoopingCall expects a ``Deferred``.  Results of
Deferred\'s created in this function are handled in the rate
measurer.  Meanwhile we want this function to return quickly to
avoid missing loop iterations.  We don\'t worry about overload, as
that is checked in the `check_rate` function.'

def _request_and_measure(self, count):

    def handle_request_error(result):
        self.rate_measurer.request_failed(result)
        write_failure(result)
    if (count != 1):
        Message.log(function='_request_and_measure', count=count)
    for _ in range(count):
        self.rate_measurer.update_rate()
        for _ in range(self.request_rate):
            t0 = self.reactor.seconds()
            d = self.request.make_request()
            def get_time(_ignore, reactor=self.reactor, t0=t0):
                return (reactor.seconds() - t0)
            d.addCallback(get_time)
            self.rate_measurer.request_sent()
            d.addCallbacks(self.rate_measurer.response_received, handle_request_error)
    return succeed(None)
