mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Make LevelDB chunk size a flag.
This commit is contained in:
parent
ce4f560e48
commit
8939e0723a
|
@ -32,8 +32,9 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
maximumChunkSize = 200
|
||||
sortConcurrency = 2
|
||||
leveldbChunkSize = flag.Int("leveldbChunkSize", 200, "Maximum number of samples stored under one key.")
|
||||
|
||||
sortConcurrency = 2
|
||||
)
|
||||
|
||||
type LevelDBMetricPersistence struct {
|
||||
|
@ -257,7 +258,7 @@ func (l *LevelDBMetricPersistence) AppendSamples(samples model.Samples) (err err
|
|||
break
|
||||
}
|
||||
|
||||
take := maximumChunkSize
|
||||
take := *leveldbChunkSize
|
||||
if lengthOfGroup < take {
|
||||
take = lengthOfGroup
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue