// Size returns the total number of operations inside the batch
// including normal index operations and internal operations.
176318
func (b *Batch) Size() int {
	return len(b.internal.IndexOps) + len(b.internal.InternalOps)
}
564183
func (tx *Transaction) Size() common.StorageSize {
	if size := tx.size.Load(); size != nil {
		return size.(common.StorageSize)
	}
	c := writeCounter(0)
	rlp.Encode(&c, &tx.data)
	tx.size.Store(common.StorageSize(c))
	return common.StorageSize(c)
}
237271
func (c *CacheableFilter) Size() (uint64, error) {
	f, err := c.Filter.NBytes()
	if err != nil {
		return 0, err
	}
	return uint64(len(f)), nil
}
1032527
func (s *DeleteByQueryService) Size(size int) *DeleteByQueryService {
	s.size = &size
	return s
}
835743
func (c *AppPackageDeleteCall) Size(size string) *AppPackageDeleteCall {
	c.urlParams_.Set("size", size)
	return c
}
545516
func (mc *cache) Size() int {
	mc.mu.Lock()
	defer mc.mu.Unlock()
	return mc.size
}
1148096
func (a *IPRangeAllocator) Size() int64 {
	a.mutex.Lock()
	defer a.mutex.Unlock()
	return a.size
}
1070687
func (af *AutoFile) Size() (int64, error) {
	af.mtx.Lock()
	defer af.mtx.Unlock()

	if af.file == nil {
		if err := af.openFile(); err != nil {
			return -1, err
		}
	}

	stat, err := af.file.Stat()
	if err != nil {
		return -1, err
	}
	return stat.Size(), nil
}
812528
func (b *Buffer) Size() int {
	size := len(b.Buf)
	for _, buf := range b.bufs {
		size += len(buf)
	}
	return size
}
74712
func (c *CacheableBlock) Size() (uint64, error) {
	return uint64(c.Block.MsgBlock().SerializeSize()), nil
}
933484
func (s *SearchSource) Size(size int) *SearchSource {
	s.size = size
	return s
}
1336131
func (inst *DenseInstances) Size() (int, int) {
	return len(inst.AllAttributes()), inst.maxRow
}
442892
func (t *tsmGeneration) size() uint64 {
	var n uint64
	for _, f := range t.files {
		n += uint64(f.Size)
	}
	return n
}
404845
func (s *UpdateByQueryService) Size(size int) *UpdateByQueryService {
	s.size = &size
	return s
}
1237729
func (r *Registry) Size() int {
	r.m.RLock()
	defer r.m.RUnlock()
	return len(r.instruments)
}
161302
func (bm *BlockMeta) Size() int {
	bs, _ := bm.Marshal()
	return len(bs)
}
868137
func (c *Ctrie) Size() uint {
	// TODO: The size operation can be optimized further by caching the size
	// information in main nodes of a read-only Ctrie – this reduces the
	// amortized complexity of the size operation to O(1) because the size
	// computation is amortized across the update operations that occurred
	// since the last snapshot.
	size := uint(0)
	for _ = range c.Iterator(nil) {
		size++
	}
	return size
}