Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

knotmirror/xrpc: pprof labeling

Signed-off-by: Seongmin Lee <git@boltless.me>

author
Seongmin Lee
committer
Tangled
date (May 12, 2026, 11:47 AM +0300) commit 3dae20c5 parent 343c005b change-id ztsrnvvr
+15 -3
+5 -1
knotmirror/xrpc/git_get_blob.go
··· 7 7 "io" 8 8 "net/http" 9 9 "path/filepath" 10 + "runtime/pprof" 10 11 "slices" 11 12 "strings" 12 13 ··· 37 38 return 38 39 } 39 40 40 - file, err := x.getFile(r.Context(), repo, ref, path) 41 + var file *object.File 42 + pprof.Do(r.Context(), pprof.Labels("repo", repo.String()), func(ctx context.Context) { 43 + file, err = x.getFile(ctx, repo, ref, path) 44 + }) 41 45 if err != nil { 42 46 l.Warn("local mirror failed, trying proxy", "err", err) 43 47 if x.proxyToKnot(w, r, repo) {
+5 -1
knotmirror/xrpc/git_get_tree.go
··· 5 5 "fmt" 6 6 "net/http" 7 7 "path/filepath" 8 + "runtime/pprof" 8 9 "time" 9 10 "unicode/utf8" 10 11 ··· 31 32 return 32 33 } 33 34 34 - out, err := x.getTree(r.Context(), repo, ref, path) 35 + var out *tangled.GitTempGetTree_Output 36 + pprof.Do(r.Context(), pprof.Labels("repo", repo.String()), func(ctx context.Context) { 37 + out, err = x.getTree(ctx, repo, ref, path) 38 + }) 35 39 if err != nil { 36 40 l.Warn("local mirror failed, trying proxy", "repo", repo, "err", err) 37 41 if x.proxyToKnot(w, r, repo) {
+5 -1
knotmirror/xrpc/git_list_languages.go
··· 6 6 "fmt" 7 7 "math" 8 8 "net/http" 9 + "runtime/pprof" 9 10 "time" 10 11 11 12 "github.com/bluesky-social/indigo/atproto/atclient" ··· 47 48 } 48 49 } 49 50 50 - out, err := x.listLanguages(r.Context(), repo, ref) 51 + var out *tangled.GitTempListLanguages_Output 52 + pprof.Do(r.Context(), pprof.Labels("repo", repo.String()), func(ctx context.Context) { 53 + out, err = x.listLanguages(ctx, repo, ref) 54 + }) 51 55 if err != nil { 52 56 l.Warn("local mirror failed, trying proxy", "err", err) 53 57 if x.proxyToKnot(w, r, repo) {