Skip to content

Commit 1d8a4a6

Browse files
committed
add tests
1 parent db81681 commit 1d8a4a6

File tree

2 files changed

+752
-31
lines changed

2 files changed

+752
-31
lines changed

autocomplete/autocomplete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func (h *Handler) ServeTags(w http.ResponseWriter, r *http.Request) {
271271
limiter.SendDuration(queueDuration.Milliseconds())
272272
metrics.SendFindMetrics(metrics.TagsRequestMetric, status, dMS, 0, h.config.Metrics.ExtendedStat, metricsCount)
273273

274-
if !findCache && chReadRows != 0 && chReadBytes != 0 {
274+
if !findCache && chReadRows > 0 && chReadBytes > 0 {
275275
errored := status != http.StatusOK && status != http.StatusNotFound
276276
metrics.SendQueryRead(metrics.AutocompleteQMetric, 0, 0, dMS, metricsCount, readBytes, chReadRows, chReadBytes, errored)
277277
}

0 commit comments

Comments
 (0)