Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchen-db committed May 17, 2024
1 parent 7ea5c67 commit 06e7126
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/cortex/querier/queryrange/query_bytes_fetched.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ func sumQueryBytesFetched(responses ...Response) uint64 {
}

func QueryBytesFetchedPrometheusResponseHeaders(responses ...Response) []*PrometheusResponseHeader {
n := sumQueryBytesFetched(responses...)
if n == 0 {
return nil
}
return []*PrometheusResponseHeader{{
Name: QueryBytesFetchedHeaderName,
Values: []string{strconv.FormatUint(sumQueryBytesFetched(responses...), 10)},
Values: []string{strconv.FormatUint(n, 10)},
}}
}

Expand Down

0 comments on commit 06e7126

Please sign in to comment.