code: func computeChunkEndTime(start, cur, max int64) int64 {
  	a := (max - start) / ((cur - start + 1) * 4)
  	if a == 0 {
  		return max
  	}
  	return start + (max-start)/a
  }
docs: // computeChunkEndTime estimates the end timestamp based the beginning of a chunk,
  // its current timestamp and the upper bound up to which we insert data.
  // It assumes that the time range is 1/4 full.