fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

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

shards: log to trace on shardedSearcher.Search (#866)

This logging is useful since we directly call this search (and avoid
typeRepoSearcher) when evaluating List calls for type:repo searches. By
adding in this logging we can understand the performance of potentially
expensive queries here.

+10
+10
shards/shards.go
··· 514 514 515 515 func (ss *shardedSearcher) Search(ctx context.Context, q query.Q, opts *zoekt.SearchOptions) (sr *zoekt.SearchResult, err error) { 516 516 tr, ctx := trace.New(ctx, "shardedSearcher.Search", "") 517 + tr.LazyLog(q, true) 518 + tr.LazyPrintf("opts: %+v", opts) 517 519 defer func() { 520 + if sr != nil { 521 + tr.LazyPrintf("num files: %d", len(sr.Files)) 522 + tr.LazyPrintf("stats: %+v", sr.Stats) 523 + } 524 + if err != nil { 525 + tr.LazyPrintf("error: %v", err) 526 + tr.SetError(err) 527 + } 518 528 tr.Finish() 519 529 }() 520 530 ctx, cancel := context.WithCancel(ctx)