// Len returns the number of logs in the logCache
178328
func (c *logCache) Len() int {
	c.RLock()
	defer c.RUnlock()
	return len(c.logs)
}
731274
func Len(x Value) int {
	switch x := x.(type) {
	case String:
		return x.Len()
	case Sequence:
		return x.Len()
	}
	return -1
}
1156627
func (b *Buffer) Len() int {
	b.Lock()
	defer b.Unlock()

	return b.length()
}
1052246
func (l *List) Len() (n int64) {
	for _, buffer := range *l {
		if n > math.MaxInt64-buffer.Len() {
			return math.MaxInt64
		}
		n += buffer.Len()
	}
	return n
}
421837
func (p *DB) Len() int {
	p.mu.RLock()
	defer p.mu.RUnlock()
	return p.n
}
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
}
48282
func (macds *MACDSignalSeries) Len() int {
	if macds.InnerSeries == nil {
		return 0
	}

	return macds.InnerSeries.Len()
}
1188443
func (l Line) Len() float64 {
	return l.A.To(l.B).Len()
}
203558
func (t *Transport) len() int {
	l := 0
	for _, conns := range t.conns {
		l += len(conns)
	}
	return l
}
704321
func (r *responseWriter) Len() int {
	if r.buf == nil {
		return 0
	}
	return r.buf.Len()
}
812599
func (db *Database) Len(sid string) (n int) {
	prefix := makePrefix(sid)

	txn := db.Service.NewTransaction(false)
	iter := txn.NewIterator(iterOptionsNoValues)

	for iter.Rewind(); iter.ValidForPrefix(prefix); iter.Next() {
		n++
	}

	iter.Close()
	txn.Discard()
	return
}
407972
func Len(v int32) int {
	u := uint32(v)
	switch {
	case u < 0x80:
		return 1
	case u < 0x4000:
		return 2
	case u < 0x200000:
		return 3
	case u < 0x10000000:
		return 4
	default:
		return 5
	}
}
1348052
func (q *Queue) Len() int {
	q.waitingLock.Lock()
	defer q.waitingLock.Unlock()
	return len(q.waiting)
}
970101
func (d *DB) Len() (num int) {
	d.db.View(func(tx *bolt.Tx) error {

		// Assume bucket exists and has keys
		b := tx.Bucket(tableURLs)
		if b == nil {
			return nil
		}

		b.ForEach(func([]byte, []byte) error {
			num++
			return nil
		})
		return nil
	})
	return
}
1276888
func (c *rankCache) Len() int {
	c.mu.Lock()
	defer c.mu.Unlock()
	return len(c.entries)
}
508700
func (q *Queue) Len() int {
	q.lock.RLock()
	defer q.lock.RUnlock()

	l := len(q.jobs)

	return l
}
518294
func (gt *GLTriangles) Len() int {
	return len(gt.data) / gt.vs.Stride()
}