// EstimateSize returns an estimate (in bytes) of the size of this structure when encoded.
968564
func (x *Intention) EstimateSize() int {
	// 60 = 36 (uuid) + 16 (RaftIndex) + 4 (Precedence) + 4 (DefaultPort)
	size := 60 + len(x.Description) + len(x.SourceNS) + len(x.SourceName) + len(x.DestinationNS) +
		len(x.DestinationName) + len(x.SourceType) + len(x.Action) + len(x.DefaultAddr)

	for k, v := range x.Meta {
		size += len(k) + len(v)
	}

	return size
}
19368
func (p *PushEventRepository) GetSize() int {
	if p == nil || p.Size == nil {
		return 0
	}
	return *p.Size
}
573070
func (z *arrayContainer) Msgsize() (s int) {
	s = 1 + 8 + msgp.ArrayHeaderSize + (len(z.content) * (msgp.Uint16Size))
	return
}
1270544
func (a *CompositeAggregation) Size(size int) *CompositeAggregation {
	a.size = &size
	return a
}
1161858
func (msg *MsgTx) SerializeSize() int {
	n := msg.baseSize()

	if msg.HasWitness() {
		// The marker, and flag fields take up two additional bytes.
		n += 2

		// Additionally, factor in the serialized size of each of the
		// witnesses for each txin.
		for _, txin := range msg.TxIn {
			n += txin.Witness.SerializeSize()
		}
	}

	return n
}
705780
func (ef *FeeEstimator) estimates() []SatoshiPerByte {
	set := ef.newEstimateFeeSet()

	estimates := make([]SatoshiPerByte, estimateFeeDepth)
	for i := 0; i < estimateFeeDepth; i++ {
		estimates[i] = set.estimateFee(i + 1)
	}

	return estimates
}
1169635
func (_class BlobClass) GetSize(sessionID SessionRef, self BlobRef) (_retval int, _err error) {
	_method := "blob.get_size"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertBlobRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertIntToGo(_method + " -> ", _result.Value)
	return
}
593112
func (z *Row) Msgsize() (s int) {
	s = 1 + 7 + msgp.ArrayHeaderSize
	for zgensym_56fd93edf47ccbd5_0 := range z.K {
		s += msgp.GuessSize(z.K[zgensym_56fd93edf47ccbd5_0])
	}
	s += 7 + msgp.ArrayHeaderSize
	for zgensym_56fd93edf47ccbd5_1 := range z.V {
		s += msgp.GuessSize(z.V[zgensym_56fd93edf47ccbd5_1])
	}
	s += 7 + msgp.Int64Size
	return
}
819751
func (t *TxOut) SerializeSize() int {
	// Value 8 bytes + serialized varint size for the length of PkScript +
	// PkScript bytes.
	return 8 + VarIntSerializeSize(uint64(len(t.PkScript))) + len(t.PkScript)
}
882644
func FileSize(file string) (int64, error) {
	f, err := os.Stat(file)
	if err != nil {
		return 0, err
	}
	return f.Size(), nil
}
108956
func Size(buf []byte) (ImageSize, error) {
	metadata, err := Metadata(buf)
	if err != nil {
		return ImageSize{}, err
	}

	return ImageSize{
		Width:  int(metadata.Size.Width),
		Height: int(metadata.Size.Height),
	}, nil
}
195794
func (ec *Cache) Size() uint64 {
	ec.RLock()
	s := ec.totalSize
	ec.RUnlock()
	return s
}
572606
func (d *MutexDatastore) GetSize(key ds.Key) (size int, err error) {
	d.RLock()
	defer d.RUnlock()
	return d.child.GetSize(key)
}
405979
func (r *Receipt) Size() common.StorageSize {
	size := common.StorageSize(unsafe.Sizeof(*r)) + common.StorageSize(len(r.PostState))

	size += common.StorageSize(len(r.Logs)) * common.StorageSize(unsafe.Sizeof(Log{}))
	for _, log := range r.Logs {
		size += common.StorageSize(len(log.Topics)*common.HashLength + len(log.Data))
	}
	return size
}
1214822
func (z *Forward) Msgsize() (s int) {
	s = 1 + msgp.StringPrefixSize + len(z.Tag) + msgp.ArrayHeaderSize
	for za0001 := range z.Entries {
		s += 1 + msgp.Int64Size + msgp.GuessSize(z.Entries[za0001].Record)
	}
	s += msgp.MapHeaderSize
	if z.Option != nil {
		for za0002, za0003 := range z.Option {
			_ = za0003
			s += msgp.StringPrefixSize + len(za0002) + msgp.StringPrefixSize + len(za0003)
		}
	}
	return
}
610556
func (d *Datastore) GetSize(k ds.Key) (int, error) {
	var size int
	err := d.runOp(func() error {
		var err error
		size, err = d.Batching.GetSize(k)
		return err
	})
	return size, err
}
796576
func (msg *MsgBlock) SerializeSize() int {
	// Block header bytes + Serialized varint size for the number of
	// transactions.
	n := blockHeaderLen + VarIntSerializeSize(uint64(len(msg.Transactions)))

	for _, tx := range msg.Transactions {
		n += tx.SerializeSize()
	}

	return n
}