// Len returns length of a given queue.
354052
func (pool *Pool) Len(queue string) (int, error) {
	sess := pool.redis.Get()
	defer sess.Close()

	length, err := redis.Int(sess.Do("QLEN", queue))
	if err != nil {
		return 0, err
	}

	return length, nil
}
99470
func (s *scheduler) Len() int {
	s.mu.Lock()
	defer s.mu.Unlock()

	count := 0
	for _, bucket := range s.buckets {
		count += len(bucket)
	}
	return count
}
931043
func (c *cache) Len() int {
	// Send info task.
	lenc := make(chan int, 1)
	c.lenc <- lenc
	// Receive response.
	l := <-lenc
	return l
}
1223170
func (hm *SyncedHashMap) Len() int {
	hm.RLock()
	defer hm.RUnlock()
	return len(hm.keys)
}
613603
func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	if assert.Len(t, object, length, msgAndArgs...) {
		return
	}
	t.FailNow()
}
294084
func (r *Random) Len() int {
	if r.len != nil {
		return *r.len
	}
	return math.MaxInt32
}
1177138
func (c *Cache) Len() int {
	if c.cache == nil {
		return 0
	}
	return c.ll.Len()
}
238736
func (m *MultipartStreamer) Len() int64 {
	return m.contentLength + int64(m.bodyBuffer.Len()) + int64(m.closeBuffer.Len())
}
65837
func (db *Database) Len(sid string) (n int) {
	return len(db.keys(sid))
}
1349573
func (q *Type) Len() int {
	q.cond.L.Lock()
	defer q.cond.L.Unlock()
	return len(q.queue)
}
1096393
func (t *SessionTimers) Len() int {
	t.RLock()
	defer t.RUnlock()
	return len(t.m)
}
946178
func (p *Publisher) Len() int {
	p.m.RLock()
	i := len(p.subscribers)
	p.m.RUnlock()
	return i
}
616072
func (h *singleConnectionHeap) Len() int {
	cnt := 0
	h.mutex.Lock()

	if !h.full {
		if h.head >= h.tail {
			cnt = int(h.head) - int(h.tail)
		} else {
			cnt = int(h.size) - (int(h.tail) - int(h.head))
		}
	} else {
		cnt = int(h.size)
	}
	h.mutex.Unlock()
	return cnt
}
1237041
func (b *ByteBuffer) Len() int {
	b.Lock()
	defer b.Unlock()
	return b.b.Len()
}
1358583
func (d *Disque) QueueLength(queueName string) (queueLength int, err error) {
	return redis.Int(d.call("QLEN", redis.Args{}.Add(queueName)))
}
561789
func (q *Queue) Len() (_, _ int) {

	return q.count, len(q.buffer)
}
538008
func (t *Tree) Len() int {
	if t.root != nil {
		return t.root.size
	}
	return 0
}