From: Matt Joiner Date: Sat, 27 Jan 2018 01:01:09 +0000 (+1100) Subject: Improve Torrent.BytesCompleted comment X-Git-Tag: v1.0.0~259 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=8c6d0440c2fa903388af1121433c71d33b9a9ef9;p=btrtrc.git Improve Torrent.BytesCompleted comment --- diff --git a/t.go b/t.go index d8ab0a7f..548247f7 100644 --- a/t.go +++ b/t.go @@ -80,7 +80,10 @@ func (t *Torrent) Drop() { t.cl.mu.Unlock() } -// Number of bytes of the entire torrent we have completed. +// Number of bytes of the entire torrent we have completed. This is the sum of +// completed pieces, and dirtied chunks of incomplete pieces. Do not use this +// for download rate, as it can go down when pieces are lost or fail checks. +// Sample Torrent.Stats.DataBytesRead for actual file data download rate. func (t *Torrent) BytesCompleted() int64 { t.cl.mu.RLock() defer t.cl.mu.RUnlock()