includeBlock uses the provided time range to determine if the block should be included in the search.
(b *backend.BlockMeta, start, end time.Time)
| 941 | |
| 942 | // includeBlock uses the provided time range to determine if the block should be included in the search. |
| 943 | func includeBlock(b *backend.BlockMeta, start, end time.Time) bool { |
| 944 | startNano := start.UnixNano() |
| 945 | endNano := end.UnixNano() |
| 946 | |
| 947 | if startNano == 0 || endNano == 0 { |
| 948 | return true |
| 949 | } |
| 950 | |
| 951 | blockStart := b.StartTime.UnixNano() |
| 952 | blockEnd := b.EndTime.UnixNano() |
| 953 | |
| 954 | return blockStart <= endNano && blockEnd >= startNano |
| 955 | } |
| 956 | |
| 957 | // searchTagValuesV2CacheKey generates a cache key for the searchTagValuesV2 request |
| 958 | // cache key is used as the filename to store the protobuf data on disk |
no outgoing calls