put bandwidth totals into the diagnostic messages
Jeromy committed
Oct 13, 2014 at 10:59 UTC
be5f9769b2289ae3df9fe0e9f27dec7f1d210c6e
1 file changed
+3
diagnostics/diag.go
+3
@@ -53,6 +53,8 @@ type DiagInfo struct {
53
Connections []connDiagInfo
54
Keys []string
55
LifeSpan time.Duration
56
+ BwIn uint64
57
+ BwOut uint64
58
CodeVersion string
59
}
60
@@ -75,6 +77,7 @@ func (d *Diagnostics) getDiagInfo() *DiagInfo {
77
di.ID = d.self.ID.Pretty()
78
di.LifeSpan = time.Since(d.birth)
79
di.Keys = nil // Currently no way to query datastore
80
+ di.BwIn, di.BwOut = d.network.GetBandwidthTotals()
81
82
for _, p := range d.getPeers() {
83
di.Connections = append(di.Connections, connDiagInfo{p.GetLatency(), p.ID.Pretty()})