]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Improve Torrent.BytesCompleted comment
authorMatt Joiner <anacrolix@gmail.com>
Sat, 27 Jan 2018 01:01:09 +0000 (12:01 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 27 Jan 2018 03:31:46 +0000 (14:31 +1100)
t.go

diff --git a/t.go b/t.go
index d8ab0a7f93f089e791ce3bd1033a31263552c330..548247f762fa763e95d641be5941257caceaa4be 100644 (file)
--- 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()