-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstats.go
37 lines (34 loc) · 858 Bytes
/
stats.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package lrmp
import "time"
type Stats struct {
badLength int
badVersion int
ctrlPackets int
ctrlBytes int64
dataPackets int
dataBytes int64
senderReports int
rrSelect int
receiverReports int
populationEstimate int
populationEstimateTime time.Time
failures int
outOfBand int
}
type DomainStats struct {
childScope int
enabled bool
mrtt int // in 1/8 miilisecs
repairPackets int
repairBytes int64
nack int
dupNack int
nackReply int
thirdPartyRepairs int
dupPackets int
dupBytes int64
thirdPartyDuplicates int
}
func (stats *DomainStats) getRTT() int {
return stats.mrtt >> 3
}