static getRiskToResponsiveness(
      events,
      startTime,
      endTime,
      percentiles = [0.5, 0.75, 0.9, 0.99, 1]
  ) {
    const totalTime = endTime - startTime;
    percentiles.sort((a, b) => a - b);

    const ret = this.getMainThreadTopLevelEventDurations(events, startTime, endTime);
    return this._riskPercentiles(ret.durations, totalTime, percentiles,
        ret.clippedLength);
  }
Calculates the maximum queueing time (in ms) of high priority tasks for
selected percentiles within a window of the main thread.
@see https://docs.google.com/document/d/1b9slyaB9yho91YTOkAQfpCdULFkZM9LqsipcX3t7He8/preview
@param {Array<ToplevelEvent>} events
@param {number} startTime Start time (in ms relative to timeOrigin) of range of interest.
@param {number} endTime End time (in ms relative to timeOrigin) of range of interest.
@param {!Array<number>=} percentiles Optional array of percentiles to compute. Defaults to [0.5, 0.75, 0.9, 0.99, 1].
@return {!Array<{percentile: number, time: number}>}