// Len returns the length of the packets with a maximum of 31.
348679
func (a *AdvPacket) Len() int {
	if len(a.b) > 31 {
		return 31
	}
	return len(a.b)
}
1339269
func (rules *L7Rules) Len() int {
	if rules == nil {
		return 0
	}
	return len(rules.HTTP) + len(rules.Kafka) + len(rules.DNS) + len(rules.L7)
}
1063939
func (db *Database) Len() int {
	db.lock.RLock()
	defer db.lock.RUnlock()

	return len(db.db)
}
634708
func (c *Cache) Len() int {
	if !c.nolock {
		c.mu.Lock()
		defer c.mu.Unlock()
	}
	return c.ll.Len()
}
707305
func (sp *Subscribe) len() int {
	// packet ID
	total := 2

	for _, t := range sp.Subscriptions {
		total += 2 + len(t.Topic) + 1
	}

	return total
}
8093
func (sp *Subscribe) Len() int {
	ml := sp.len()
	return headerLen(ml) + ml
}
1216310
func (h *hostsMap) Len() int {
	l := 0
	for _, v4 := range h.byNameV4 {
		l += len(v4)
	}
	for _, v6 := range h.byNameV6 {
		l += len(v6)
	}
	for _, a := range h.byAddr {
		l += len(a)
	}
	return l
}
29453
func (q *Queue) Len() int {
	q.Lock()
	defer q.Unlock()
	return q.len()
}
155980
func (udh *UDH) Len() int {
	return udh.IEI.Len() + udh.IELength.Len() + udh.IEData.Len()
}
1200261
func (c *Cache) Len() int {
	c.mtx.RLock()
	defer c.mtx.RUnlock()

	return c.ll.Len()
}
391463
func (t *deducerTrie) Len() int {
	t.RLock()
	defer t.RUnlock()
	return t.t.Len()
}
170112
func (b *Buffer) Len() int {
	version := b.preOp()
	n := b.buf.Len()
	b.postOp(version)
	return n
}
1001325
func (lg Linear) Len() int {
	if lg.start < lg.end {
		return int((lg.end-lg.start)/lg.step) + 1
	}
	return int((lg.start-lg.end)/lg.step) + 1
}
34192
func (p *ConnPool) Len() int {
	p.connsMu.Lock()
	n := len(p.conns)
	p.connsMu.Unlock()
	return n
}
238736
func (m *MultipartStreamer) Len() int64 {
	return m.contentLength + int64(m.bodyBuffer.Len()) + int64(m.closeBuffer.Len())
}
1177138
func (c *Cache) Len() int {
	if c.cache == nil {
		return 0
	}
	return c.ll.Len()
}
217739
func (c *baseCatcher) Len() int {
	c.mutex.RLock()
	defer c.mutex.RUnlock()

	return len(c.errs)
}