|
|
@ -492,8 +492,8 @@ func (z *dataUsageEntry) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
err = msgp.WrapError(err) |
|
|
|
err = msgp.WrapError(err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if zb0001 != 4 { |
|
|
|
if zb0001 != 8 { |
|
|
|
err = msgp.ArrayError{Wanted: 4, Got: zb0001} |
|
|
|
err = msgp.ArrayError{Wanted: 8, Got: zb0001} |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
z.Size, err = dc.ReadInt64() |
|
|
|
z.Size, err = dc.ReadInt64() |
|
|
@ -501,6 +501,26 @@ func (z *dataUsageEntry) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
err = msgp.WrapError(err, "Size") |
|
|
|
err = msgp.WrapError(err, "Size") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
z.ReplicatedSize, err = dc.ReadUint64() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
z.ReplicationPendingSize, err = dc.ReadUint64() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicationPendingSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
z.ReplicationFailedSize, err = dc.ReadUint64() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicationFailedSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
z.ReplicaSize, err = dc.ReadUint64() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
z.Objects, err = dc.ReadUint64() |
|
|
|
z.Objects, err = dc.ReadUint64() |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Objects") |
|
|
|
err = msgp.WrapError(err, "Objects") |
|
|
@ -533,8 +553,8 @@ func (z *dataUsageEntry) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *dataUsageEntry) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
func (z *dataUsageEntry) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
// array header, size 4
|
|
|
|
// array header, size 8
|
|
|
|
err = en.Append(0x94) |
|
|
|
err = en.Append(0x98) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
@ -543,6 +563,26 @@ func (z *dataUsageEntry) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
err = msgp.WrapError(err, "Size") |
|
|
|
err = msgp.WrapError(err, "Size") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
err = en.WriteUint64(z.ReplicatedSize) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
err = en.WriteUint64(z.ReplicationPendingSize) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicationPendingSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
err = en.WriteUint64(z.ReplicationFailedSize) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicationFailedSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
err = en.WriteUint64(z.ReplicaSize) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
err = en.WriteUint64(z.Objects) |
|
|
|
err = en.WriteUint64(z.Objects) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Objects") |
|
|
|
err = msgp.WrapError(err, "Objects") |
|
|
@ -571,9 +611,13 @@ func (z *dataUsageEntry) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *dataUsageEntry) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
func (z *dataUsageEntry) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
// array header, size 4
|
|
|
|
// array header, size 8
|
|
|
|
o = append(o, 0x94) |
|
|
|
o = append(o, 0x98) |
|
|
|
o = msgp.AppendInt64(o, z.Size) |
|
|
|
o = msgp.AppendInt64(o, z.Size) |
|
|
|
|
|
|
|
o = msgp.AppendUint64(o, z.ReplicatedSize) |
|
|
|
|
|
|
|
o = msgp.AppendUint64(o, z.ReplicationPendingSize) |
|
|
|
|
|
|
|
o = msgp.AppendUint64(o, z.ReplicationFailedSize) |
|
|
|
|
|
|
|
o = msgp.AppendUint64(o, z.ReplicaSize) |
|
|
|
o = msgp.AppendUint64(o, z.Objects) |
|
|
|
o = msgp.AppendUint64(o, z.Objects) |
|
|
|
o = msgp.AppendArrayHeader(o, uint32(dataUsageBucketLen)) |
|
|
|
o = msgp.AppendArrayHeader(o, uint32(dataUsageBucketLen)) |
|
|
|
for za0001 := range z.ObjSizes { |
|
|
|
for za0001 := range z.ObjSizes { |
|
|
@ -595,8 +639,8 @@ func (z *dataUsageEntry) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
err = msgp.WrapError(err) |
|
|
|
err = msgp.WrapError(err) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
if zb0001 != 4 { |
|
|
|
if zb0001 != 8 { |
|
|
|
err = msgp.ArrayError{Wanted: 4, Got: zb0001} |
|
|
|
err = msgp.ArrayError{Wanted: 8, Got: zb0001} |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
z.Size, bts, err = msgp.ReadInt64Bytes(bts) |
|
|
|
z.Size, bts, err = msgp.ReadInt64Bytes(bts) |
|
|
@ -604,6 +648,26 @@ func (z *dataUsageEntry) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
err = msgp.WrapError(err, "Size") |
|
|
|
err = msgp.WrapError(err, "Size") |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
z.ReplicatedSize, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
z.ReplicationPendingSize, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicationPendingSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
z.ReplicationFailedSize, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicationFailedSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
z.ReplicaSize, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
z.Objects, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
z.Objects, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
err = msgp.WrapError(err, "Objects") |
|
|
|
err = msgp.WrapError(err, "Objects") |
|
|
@ -637,7 +701,7 @@ func (z *dataUsageEntry) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageEntry) Msgsize() (s int) { |
|
|
|
func (z *dataUsageEntry) Msgsize() (s int) { |
|
|
|
s = 1 + msgp.Int64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) + z.Children.Msgsize() |
|
|
|
s = 1 + msgp.Int64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) + z.Children.Msgsize() |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|