s, r => r.duration);
  }

  /**
   * Returns the CPU self time of |event| within |rangeOfInterest|. CPU self
   * time of a slice is assumed to be evenly distributed over the wall clock
   * self time ranges of the slice.
   *
   * @param {!tr.b.Event} event
   * @param {!tr.b.math.Range} rangeOfInterest
   * @return {number}
   */
  function getCPUSelfTime_(event, rangeOfInterest) {
    if (event.duration === 0 || event.selfTime === 0) return 0;
    if (event.cpuSelfTime === undefined) return 0;
    const 