Show counters for total data transferred (fixes #265)

This commit is contained in:
Jakob Borg
2014-05-24 21:34:11 +02:00
parent 5454ca1cf7
commit c2f75d3689
5 changed files with 26 additions and 11 deletions

View File

@@ -181,6 +181,15 @@ func (m *Model) ConnectionStats() map[string]ConnectionInfo {
m.rmut.RUnlock()
m.pmut.RUnlock()
in, out := protocol.TotalInOut()
res["total"] = ConnectionInfo{
Statistics: protocol.Statistics{
At: time.Now(),
InBytesTotal: int(in),
OutBytesTotal: int(out),
},
}
return res
}