cmd/torrent/main.go | 9 +++++++++ diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index 624c2a4ee97b082e7cde31ba637f8dcca7256877..757ecdc75f2a75bea238211134a2ac17118bf685 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -369,6 +369,15 @@ outputStats(client, flags) <-stop.C() } } + spew.Dump(expvar.Get("torrent").(*expvar.Map).Get("chunks received")) + spew.Dump(client.ConnStats()) + clStats := client.ConnStats() + sentOverhead := clStats.BytesWritten.Int64() - clStats.BytesWrittenData.Int64() + log.Printf( + "client read %v, %v was useful data. sent %v non-data bytes", + humanize.Bytes(uint64(clStats.BytesRead.Int64())), + 100*float64(clStats.BytesReadUsefulData.Int64())/float64(clStats.BytesRead.Int64()), + humanize.Bytes(uint64(sentOverhead))) return nil }