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

Function DecodeSumValue

internal/metrics/stat.go:97–104  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

95}
96
97func DecodeSumValue(data []byte) (count uint64, total uint64) {
98 if len(data) != 16 {
99 return
100 }
101 count = binary.BigEndian.Uint64(data[:8])
102 total = binary.BigEndian.Uint64(data[8:])
103 return
104}
105
106func int64ToBigEndian(i int64) []byte {
107 if i < 0 {

Callers 4

TestStat_EncodeSumValueFunction · 0.92
InsertStatMethod · 0.85
TestInspectMethod · 0.85
uploadServerStatsMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestStat_EncodeSumValueFunction · 0.74