code: func AverageQueueLength() int {
  	ql.Lock()
  	var s int
  	for _, l := range q {
  		s += l
  	}
  	avg := s / len(q) // yes, it's an integer division
  	ql.Unlock()
  	return avg
  }
docs: // AverageQueueLength returns the average queue length recorded. This allows for optimizations.