etcdserver/api/v2stats/queue.go
func (q *statsQueue) frontAndBack() (*RequestStats, *RequestStats) {
	q.rwl.RLock()
	defer q.rwl.RUnlock()
	if q.size != 0 {
		return q.items[q.front], q.items[q.back]
	}
	return nil, nil
}
func (q *statsQueue) frontAndBack() (*RequestStats, *RequestStats) {
	q.rwl.RLock()
	defer q.rwl.RUnlock()
	if q.size != 0 {
		return q.items[q.front], q.items[q.back]
	}
	return nil, nil
}
// FrontAndBack gets the front and back elements in the queue
// We must grab front and back together with the protection of the lock