_isIdlePeriod(allowedRequests, requestFilter) {
    if (!this._networkRecorder) return false;
    const requests = this._networkRecorder.getRawRecords();
    let inflightRequests = 0;

    for (let i = 0; i < requests.length; i++) {
      const request = requests[i];
      if (request.finished) continue;
      if (requestFilter?.(request) === false) continue;
      if (NetworkRequest.isNonNetworkRequest(request)) continue;
      inflightRequests++;
    }

    return inflightRequests <= allowedRequests;
  }
Returns whether the number of currently inflight requests is less than or
equal to the number of allowed concurrent requests.
@param {number} allowedRequests
@param {(request: NetworkRequest) => boolean} [requestFilter]
@return {boolean}