code: func (s *summary) maybeRotateStreams() {
  	for !s.hotBufExpTime.Equal(s.headStreamExpTime) {
  		s.headStream.Reset()
  		s.headStreamIdx++
  		if s.headStreamIdx >= len(s.streams) {
  			s.headStreamIdx = 0
  		}
  		s.headStream = s.streams[s.headStreamIdx]
  		s.headStreamExpTime = s.headStreamExpTime.Add(s.streamDuration)
  	}
  }
docs: // rotateStreams needs mtx AND bufMtx locked.