From ab7fefb8b86d8c997e67aab85e817285f956a5c7 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sun, 18 Feb 2024 12:59:59 +1100 Subject: [PATCH] Disable writeChunk perf timer --- torrent.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/torrent.go b/torrent.go index 2643dd6a..63bfe744 100644 --- a/torrent.go +++ b/torrent.go @@ -24,7 +24,6 @@ import ( . "github.com/anacrolix/generics" g "github.com/anacrolix/generics" "github.com/anacrolix/log" - "github.com/anacrolix/missinggo/perf" "github.com/anacrolix/missinggo/slices" "github.com/anacrolix/missinggo/v2" "github.com/anacrolix/missinggo/v2/bitmap" @@ -949,7 +948,7 @@ func (t *Torrent) offsetRequest(off int64) (req Request, ok bool) { } func (t *Torrent) writeChunk(piece int, begin int64, data []byte) (err error) { - defer perf.ScopeTimerErr(&err)() + //defer perf.ScopeTimerErr(&err)() n, err := t.pieces[piece].Storage().WriteAt(data, begin) if err == nil && n != len(data) { err = io.ErrShortWrite -- 2.48.1