MCPcopy
hub / github.com/prometheus/prometheus / NewLeveledCompactor

Function NewLeveledCompactor

tsdb/compact.go:195–200  ·  view source on GitHub ↗
(ctx context.Context, r prometheus.Registerer, l *slog.Logger, ranges []int64, pool chunkenc.Pool, mergeFunc storage.VerticalChunkSeriesMergeFunc)

Source from the content-addressed store, hash-verified

193}
194
195func NewLeveledCompactor(ctx context.Context, r prometheus.Registerer, l *slog.Logger, ranges []int64, pool chunkenc.Pool, mergeFunc storage.VerticalChunkSeriesMergeFunc) (*LeveledCompactor, error) {
196 return NewLeveledCompactorWithOptions(ctx, r, l, ranges, pool, LeveledCompactorOptions{
197 MergeFunc: mergeFunc,
198 EnableOverlappingCompaction: true,
199 })
200}
201
202func NewLeveledCompactorWithOptions(ctx context.Context, r prometheus.Registerer, l *slog.Logger, ranges []int64, pool chunkenc.Pool, opts LeveledCompactorOptions) (*LeveledCompactor, error) {
203 if len(ranges) == 0 {

Calls 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…