"bufio"
"bytes"
"errors"
- "expvar"
"fmt"
"io"
"log"
pp "github.com/anacrolix/torrent/peer_protocol"
)
-var optimizedCancels = expvar.NewInt("optimizedCancels")
-
type peerSource string
const (
})
}
-var (
- // Track connection writer buffer writes and flushes, to determine its
- // efficiency.
- connectionWriterFlush = expvar.NewInt("connectionWriterFlush")
- connectionWriterWrite = expvar.NewInt("connectionWriterWrite")
-)
-
func (cn *connection) fillWriteBuffer(msg func(pp.Message) bool) {
numFillBuffers.Add(1)
rs, i := cn.desiredRequestState()
uploadChunksPosted = expvar.NewInt("uploadChunksPosted")
unexpectedCancels = expvar.NewInt("unexpectedCancels")
- postedCancels = expvar.NewInt("postedCancels")
pieceHashedCorrect = expvar.NewInt("pieceHashedCorrect")
pieceHashedNotCorrect = expvar.NewInt("pieceHashedNotCorrect")