Skip to content

Commit

Permalink
put bandwidth totals into the diagnostic messages
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Oct 13, 2014
1 parent 0d996bd commit 8e6b3ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions diagnostics/diag.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ type diagInfo struct {
Connections []connDiagInfo
Keys []string
LifeSpan time.Duration
BwIn uint64
BwOut uint64
CodeVersion string
}

Expand All @@ -75,6 +77,7 @@ func (d *Diagnostics) getDiagInfo() *diagInfo {
di.ID = d.self.ID.Pretty()
di.LifeSpan = time.Since(d.birth)
di.Keys = nil // Currently no way to query datastore
di.BwIn, di.BwOut = d.network.GetBandwidthTotals()

for _, p := range d.getPeers() {
di.Connections = append(di.Connections, connDiagInfo{p.GetLatency(), p.ID.Pretty()})
Expand Down

0 comments on commit 8e6b3ef

Please sign in to comment.