Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
be5f9769
Commit
be5f9769
authored
Oct 13, 2014
by
Jeromy
Committed by
Juan Batiz-Benet
Oct 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put bandwidth totals into the diagnostic messages
parent
a8330f1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
diagnostics/diag.go
diagnostics/diag.go
+3
-0
No files found.
diagnostics/diag.go
View file @
be5f9769
...
...
@@ -53,6 +53,8 @@ type DiagInfo struct {
Connections
[]
connDiagInfo
Keys
[]
string
LifeSpan
time
.
Duration
BwIn
uint64
BwOut
uint64
CodeVersion
string
}
...
...
@@ -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
()})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment