// Len returns the number of items that are currently stored in the queue and
// not consumed by its sink.
547913
func (eq *LimitQueue) Len() int {
	eq.mu.Lock()
	defer eq.mu.Unlock()
	return eq.events.Len()
}
532199
func (tr Ranges) Len() int {
	if tr.sortedRanges == nil {
		return 0
	}
	return tr.sortedRanges.Len()
}
368281
func (c *Random) Len() int {
	c.mu.RLock()
	defer c.mu.RUnlock()

	return len(c.table)
}
625243
func (c *BigCache) Len() int {
	var len int
	for _, shard := range c.shards {
		len += shard.len()
	}
	return len
}
1063939
func (db *Database) Len() int {
	db.lock.RLock()
	defer db.lock.RUnlock()

	return len(db.db)
}
508700
func (q *Queue) Len() int {
	q.lock.RLock()
	defer q.lock.RUnlock()

	l := len(q.jobs)

	return l
}
912714
func (tb *LTable) Len() int {
	if tb.array == nil {
		return 0
	}
	var prev LValue = LNil
	for i := len(tb.array) - 1; i >= 0; i-- {
		v := tb.array[i]
		if prev == LNil && v != LNil {
			return i + 1
		}
		prev = v
	}
	return 0
}
1306482
func (p *Producer) Len() int {
	return len(p.produceChannel) + len(p.events) + int(C.rd_kafka_outq_len(p.handle.rk))
}
540152
func (usl *UnSmeList) Len() int {
	var ret int
	for i := range usl.Data {
		ret = ret + usl.Data[i].Len()
	}
	return ret
}
1367943
func (tx *Tx) Len() (int, error) {
	if tx.db == nil {
		return 0, ErrTxClosed
	}
	return tx.db.keys.Len(), nil
}
369993
func (rb *RingBuffer) Len() uint64 {
	return atomic.LoadUint64(&rb.queue) - atomic.LoadUint64(&rb.dequeue)
}
592612
func (c *Cache) Len() int {
	c.lock.RLock()
	length := c.lru.Len()
	c.lock.RUnlock()
	return length
}
840068
func (that *JSONNode) Len() int {
	var ret int
	switch that.t {
	case TypeMap:
		ret = len(that.m)
	case TypeArray:
		ret = len(that.a)
	case TypeValue:
		ret = 1
	}
	return ret
}
34192
func (p *ConnPool) Len() int {
	p.connsMu.Lock()
	n := len(p.conns)
	p.connsMu.Unlock()
	return n
}
715068
func (slist *syncedList) Len() int {
	slist.RLock()
	defer slist.RUnlock()

	return slist.queue.Len()
}
217739
func (c *baseCatcher) Len() int {
	c.mutex.RLock()
	defer c.mutex.RUnlock()

	return len(c.errs)
}
1096393
func (t *SessionTimers) Len() int {
	t.RLock()
	defer t.RUnlock()
	return len(t.m)
}