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

Function EncodeSumValue

internal/metrics/stat.go:90–95  ·  view source on GitHub ↗
(count uint64, total uint64)

Source from the content-addressed store, hash-verified

88}
89
90func EncodeSumValue(count uint64, total uint64) []byte {
91 var result [16]byte
92 binary.BigEndian.PutUint64(result[:8], count)
93 binary.BigEndian.PutUint64(result[8:], total)
94 return result[:]
95}
96
97func DecodeSumValue(data []byte) (count uint64, total uint64) {
98 if len(data) != 16 {

Callers 2

TestStat_EncodeSumValueFunction · 0.92
InsertStatMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestStat_EncodeSumValueFunction · 0.74