Skip to content

Commit f3345d7

Browse files
committed
feat: metrics draft
1 parent 66f93bf commit f3345d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

metrics.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ package noise
66
//
77
// [docs]: https://arxiv.org/pdf/1509.04417.pdf
88
type metrics struct {
9+
bytesRecv uint64 // bytes received
10+
bytesSent uint64 // bytes sent
911
handshakeTime uint32 // how long took the handshake to complete.
1012
latency uint16 // rtt in ms
1113
bandwidth uint16 // remote peer bandwidth
1214
nonce uint16 // nonce ordering factor
13-
sent uint16 // sent messages
14-
recv uint16 // received messages
15+
sent uint16 // counter sent messages
16+
recv uint16 // counter received messages
1517
}
1618

1719
// calculate weight

0 commit comments

Comments
 (0)