perf: add LB popularity vs cross-ref breakdown to slow path logging
This commit is contained in:
@@ -424,10 +424,20 @@ func (e *Service) Search(query string) (*MBSearchResult, error) {
|
|||||||
e.boostWithIndexPopularity(&result)
|
e.boostWithIndexPopularity(&result)
|
||||||
} else {
|
} else {
|
||||||
// Phase 2: LB popularity lookups (3 POST calls, rate-limited).
|
// Phase 2: LB popularity lookups (3 POST calls, rate-limited).
|
||||||
|
lbStart := time.Now()
|
||||||
e.boostWithPopularity(&result)
|
e.boostWithPopularity(&result)
|
||||||
|
lbDur := time.Since(lbStart)
|
||||||
|
|
||||||
// Phase 3: cross-reference artist discographies.
|
// Phase 3: cross-reference artist discographies.
|
||||||
|
xrefStart := time.Now()
|
||||||
e.crossReferenceAlbums(query, &result)
|
e.crossReferenceAlbums(query, &result)
|
||||||
|
xrefDur := time.Since(xrefStart)
|
||||||
|
|
||||||
|
e.logger.Info("search slow path breakdown",
|
||||||
|
"query", query,
|
||||||
|
"lbPopularity", lbDur.Round(time.Millisecond),
|
||||||
|
"crossRef", xrefDur.Round(time.Millisecond),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
p2Dur := time.Since(p2Start)
|
p2Dur := time.Since(p2Start)
|
||||||
|
|||||||
Reference in New Issue
Block a user