vendor: update prometheus/tsdb

This commit is contained in:
Fabian Reinartz 2017-08-18 10:08:59 +02:00
parent 4dcb465029
commit 24b246ac28
2 changed files with 14 additions and 8 deletions

View file

@ -98,11 +98,13 @@ func newCompactorMetrics(r prometheus.Registerer) *compactorMetrics {
return m return m
} }
// LeveledCompactorOptions are the options for a LeveledCompactor.
type LeveledCompactorOptions struct { type LeveledCompactorOptions struct {
blockRanges []int64 blockRanges []int64
chunkPool chunks.Pool chunkPool chunks.Pool
} }
// NewLeveledCompactor returns a LeveledCompactor.
func NewLeveledCompactor(r prometheus.Registerer, l log.Logger, opts *LeveledCompactorOptions) *LeveledCompactor { func NewLeveledCompactor(r prometheus.Registerer, l log.Logger, opts *LeveledCompactorOptions) *LeveledCompactor {
if opts == nil { if opts == nil {
opts = &LeveledCompactorOptions{ opts = &LeveledCompactorOptions{
@ -151,6 +153,10 @@ func (c *LeveledCompactor) Plan(dir string) ([]string, error) {
return dms[i].meta.MinTime < dms[j].meta.MinTime return dms[i].meta.MinTime < dms[j].meta.MinTime
}) })
return c.plan(dms)
}
func (c *LeveledCompactor) plan(dms []dirMeta) ([]string, error) {
if len(dms) <= 1 { if len(dms) <= 1 {
return nil, nil return nil, nil
} }
@ -170,7 +176,7 @@ func (c *LeveledCompactor) Plan(dir string) ([]string, error) {
break break
} }
if meta.Stats.NumSeries/meta.Stats.NumTombstones <= 20 { // 5% if meta.Stats.NumSeries/(meta.Stats.NumTombstones+1) <= 20 { // 5%
return []string{dms[i].dir}, nil return []string{dms[i].dir}, nil
} }
} }

14
vendor/vendor.json vendored
View file

@ -853,22 +853,22 @@
"revisionTime": "2016-04-11T19:08:41Z" "revisionTime": "2016-04-11T19:08:41Z"
}, },
{ {
"checksumSHA1": "x7qome5K8QtwLWlHQDsR0ISrp48=", "checksumSHA1": "WvgmP/a6PVjj33/h8L7XrNUmoQE=",
"path": "github.com/prometheus/tsdb", "path": "github.com/prometheus/tsdb",
"revision": "e0aca4bee9ae472d1c164c5562eed2a4bf4c700a", "revision": "c4ca881685ae1266a75caf57da46d8b6934213c0",
"revisionTime": "2017-08-11T10:42:10Z" "revisionTime": "2017-08-18T07:54:27Z"
}, },
{ {
"checksumSHA1": "Gua979gmISm4cJP/fR2hL8m5To8=", "checksumSHA1": "Gua979gmISm4cJP/fR2hL8m5To8=",
"path": "github.com/prometheus/tsdb/chunks", "path": "github.com/prometheus/tsdb/chunks",
"revision": "e0aca4bee9ae472d1c164c5562eed2a4bf4c700a", "revision": "c4ca881685ae1266a75caf57da46d8b6934213c0",
"revisionTime": "2017-08-11T10:42:10Z" "revisionTime": "2017-08-18T07:54:27Z"
}, },
{ {
"checksumSHA1": "zhmlvc322RH1L3l9DaA9d/HVVWs=", "checksumSHA1": "zhmlvc322RH1L3l9DaA9d/HVVWs=",
"path": "github.com/prometheus/tsdb/labels", "path": "github.com/prometheus/tsdb/labels",
"revision": "e0aca4bee9ae472d1c164c5562eed2a4bf4c700a", "revision": "c4ca881685ae1266a75caf57da46d8b6934213c0",
"revisionTime": "2017-08-11T10:42:10Z" "revisionTime": "2017-08-18T07:54:27Z"
}, },
{ {
"checksumSHA1": "5SYLEhADhdBVZAGPVHWggQl7H8k=", "checksumSHA1": "5SYLEhADhdBVZAGPVHWggQl7H8k=",