]> Sergey Matveev's repositories - btrtrc.git/blobdiff - global.go
Track chunks received in nexted expvar.Map
[btrtrc.git] / global.go
index ff237c8ee1edda4f9d464d08d9db1bb49c7fa670..1a09b06e6b4d6dbd96cd018a6522721429af593b 100644 (file)
--- a/global.go
+++ b/global.go
@@ -26,6 +26,7 @@ func defaultPeerExtensionBytes() PeerExtensionBits {
 
 func init() {
        torrent.Set("peers supporting extension", &peersSupportingExtension)
+       torrent.Set("chunks received", &chunksReceived)
 }
 
 // I could move a lot of these counters to their own file, but I suspect they
@@ -33,6 +34,7 @@ func init() {
 var (
        torrent                  = expvar.NewMap("torrent")
        peersSupportingExtension expvar.Map
+       chunksReceived           expvar.Map
 
        pieceHashedCorrect    = expvar.NewInt("pieceHashedCorrect")
        pieceHashedNotCorrect = expvar.NewInt("pieceHashedNotCorrect")