// Len returns all the "shorted" urls length
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
}
217739
func (c *baseCatcher) Len() int {
	c.mutex.RLock()
	defer c.mutex.RUnlock()

	return len(c.errs)
}
923121
func (p *Prefix) Len() (length int) {
	length = len(p.Name)
	if len(p.User) > 0 {
		length = length + len(p.User) + 1
	}
	if len(p.Host) > 0 {
		length = length + len(p.Host) + 1
	}
	return
}
1237041
func (b *ByteBuffer) Len() int {
	b.Lock()
	defer b.Unlock()
	return b.b.Len()
}
1237222
func (h Hash) Len() int {
	ret := len(h)
	for _, c := range h {
		if c == 0 {
			ret--
		} else {
			break
		}
	}
	return ret
}
238736
func (m *MultipartStreamer) Len() int64 {
	return m.contentLength + int64(m.bodyBuffer.Len()) + int64(m.closeBuffer.Len())
}
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
}
530906
func (lrs LinearRegressionSeries) Len() int {
	return util.Math.MinInt(lrs.GetLimit(), lrs.InnerSeries.Len()-lrs.GetOffset())
}
540152
func (usl *UnSmeList) Len() int {
	var ret int
	for i := range usl.Data {
		ret = ret + usl.Data[i].Len()
	}
	return ret
}
1276888
func (c *rankCache) Len() int {
	c.mu.Lock()
	defer c.mu.Unlock()
	return len(c.entries)
}
294084
func (r *Random) Len() int {
	if r.len != nil {
		return *r.len
	}
	return math.MaxInt32
}
1339269
func (rules *L7Rules) Len() int {
	if rules == nil {
		return 0
	}
	return len(rules.HTTP) + len(rules.Kafka) + len(rules.DNS) + len(rules.L7)
}
191858
func (b *Buffer) Len() int {
	return len(b.data) / b.f.Width()
}
1100809
func (macdl *MACDLineSeries) Len() int {
	if macdl.InnerSeries == nil {
		return 0
	}

	return macdl.InnerSeries.Len()
}
1331417
func (e *EndpointSet) Len() int {
	e.mutex.RLock()
	defer e.mutex.RUnlock()
	return len(e.endpoints)
}
1350469
func (ps *peerSet) Len() int {
	ps.lock.RLock()
	defer ps.lock.RUnlock()

	return len(ps.peers)
}
209027
func (m *ClientManager) Len() int {
	if m.cache == nil {
		return 0
	}
	m.mu.Lock()
	defer m.mu.Unlock()
	return m.ll.Len()
}