From: Matt Joiner Date: Thu, 14 Aug 2025 02:40:18 +0000 (+1000) Subject: Remove pprof labels for webseed request read routine X-Git-Tag: v1.59.0~2^2~8 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=7563c1eace4c92093e2f77d801c1d1ca78321159;p=btrtrc.git Remove pprof labels for webseed request read routine --- diff --git a/webseed-peer.go b/webseed-peer.go index 2ebfd66c..cbeac41c 100644 --- a/webseed-peer.go +++ b/webseed-peer.go @@ -7,6 +7,7 @@ import ( "io" "log/slog" "math/rand" + "runtime/pprof" "strings" "sync" "time" @@ -167,7 +168,11 @@ func (ws *webseedPeer) spawnRequest(begin, end RequestIndex, logger *slog.Logger "end", end, "len", end-begin, ) - go ws.runRequest(&wsReq) + go func() { + // Detach cost association from webseed update requests routine. + pprof.SetGoroutineLabels(context.Background()) + ws.runRequest(&wsReq) + }() } func (me *webseedPeer) getRequestKey(wr *webseedRequest) webseedUniqueRequestKey {