From e8077cba6e20741171fc1bb2a87617a8af9419ec Mon Sep 17 00:00:00 2001 From: mpl Date: Fri, 17 Nov 2017 17:41:40 +0100 Subject: [PATCH] pkg/search: print describe speed only in debug Change-Id: I4f22ccf907702b2d2bc7ada06af7ef85b2f1963a --- pkg/search/query.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/search/query.go b/pkg/search/query.go index 2ca93bb7c..d0c2e557c 100644 --- a/pkg/search/query.go +++ b/pkg/search/query.go @@ -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 }