From e3479b0bb36f98e0155aa55d390a50b9e55533cd Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 1 Sep 2017 10:46:26 +1000 Subject: [PATCH] Remove unused code --- connection.go | 10 ---------- global.go | 1 - 2 files changed, 11 deletions(-) diff --git a/connection.go b/connection.go index 45c2c20a..05c5f5ea 100644 --- a/connection.go +++ b/connection.go @@ -4,7 +4,6 @@ import ( "bufio" "bytes" "errors" - "expvar" "fmt" "io" "log" @@ -24,8 +23,6 @@ import ( pp "github.com/anacrolix/torrent/peer_protocol" ) -var optimizedCancels = expvar.NewInt("optimizedCancels") - type peerSource string const ( @@ -338,13 +335,6 @@ func (cn *connection) SetInterested(interested bool, msg func(pp.Message) bool) }) } -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() diff --git a/global.go b/global.go index a89659ae..9e357c56 100644 --- a/global.go +++ b/global.go @@ -63,7 +63,6 @@ var ( uploadChunksPosted = expvar.NewInt("uploadChunksPosted") unexpectedCancels = expvar.NewInt("unexpectedCancels") - postedCancels = expvar.NewInt("postedCancels") pieceHashedCorrect = expvar.NewInt("pieceHashedCorrect") pieceHashedNotCorrect = expvar.NewInt("pieceHashedNotCorrect") -- 2.48.1