MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / EncodeSumKey

Method EncodeSumKey

internal/metrics/stat.go:44–46  ·  view source on GitHub ↗
(version int32)

Source from the content-addressed store, hash-verified

42}
43
44func (this *Stat) EncodeSumKey(version int32) string {
45 return string(byteutils.Concat([]byte(this.Time), []byte{'_'}, int32ToBigEndian(version), int64ToBigEndian(this.ServerId)))
46}
47
48func DecodeValueKey(valueKey string) (serverId int64, timeString string, version int32, value int64, hash string, err error) {
49 var b = []byte(valueKey)

Callers 2

TestStat_EncodeSumKeyFunction · 0.80
InsertStatMethod · 0.80

Calls 2

int32ToBigEndianFunction · 0.85
int64ToBigEndianFunction · 0.85

Tested by 1

TestStat_EncodeSumKeyFunction · 0.64