MCPcopy Create free account
hub / github.com/cortexproject/cortex / ShouldConvertBlockToParquet

Function ShouldConvertBlockToParquet

pkg/storage/parquet/util.go:3–6  ·  view source on GitHub ↗
(mint, maxt int64, timeRanges []int64)

Source from the content-addressed store, hash-verified

1package parquet
2
3func ShouldConvertBlockToParquet(mint, maxt int64, timeRanges []int64) bool {
4 // We assume timeRanges[0] is the TSDB block duration (2h), and we don't convert them.
5 return getBlockTimeRange(mint, maxt, timeRanges) > timeRanges[0]
6}
7
8func getBlockTimeRange(mint, maxt int64, timeRanges []int64) int64 {
9 timeRange := int64(0)

Callers 1

Calls 1

getBlockTimeRangeFunction · 0.85

Tested by 1