Merge "pkg/search: print describe speed only in debug"

This commit is contained in:
Mathieu Lonjaret 2017-11-17 16:43:20 +00:00 committed by Gerrit Code Review
commit 2424354614
1 changed files with 3 additions and 1 deletions

View File

@ -1102,7 +1102,9 @@ func (h *Handler) Query(rawq *SearchQuery) (ret_ *SearchResult, _ error) {
q.Describe.BlobRefs = blobs
t0 := time.Now()
res, err := s.h.DescribeLocked(ctx, q.Describe)
log.Printf("Describe of %d blobs = %v", len(blobs), time.Since(t0))
if debugQuerySpeed {
log.Printf("Describe of %d blobs = %v", len(blobs), time.Since(t0))
}
if err != nil {
return nil, err
}