mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-10-29 14:37:02 +00:00
Improve power report attribution and sampling
This commit is contained in:
@@ -83,9 +83,16 @@ func readInterfaceCounters() map[string]interfaceCounters {
|
||||
if inErr != nil || outErr != nil {
|
||||
continue
|
||||
}
|
||||
inBytes, inBytesErr := strconv.ParseUint(fields[0], 10, 64)
|
||||
outBytes, outBytesErr := strconv.ParseUint(fields[8], 10, 64)
|
||||
if inBytesErr != nil || outBytesErr != nil {
|
||||
continue
|
||||
}
|
||||
result[name] = interfaceCounters{
|
||||
inPackets: uint32(inPackets),
|
||||
outPackets: uint32(outPackets),
|
||||
inPackets: inPackets,
|
||||
outPackets: outPackets,
|
||||
inBytes: inBytes,
|
||||
outBytes: outBytes,
|
||||
}
|
||||
}
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user