mirror of
https://github.com/prometheus/prometheus
synced 2024-12-26 00:23:18 +00:00
Changed to open_head_chunks to address review.
Now incrementing numHeadChunks directly.
This commit is contained in:
parent
074050b8c0
commit
025c828976
@ -258,7 +258,7 @@ func NewMemorySeriesStorage(o *MemorySeriesStorageOptions) *MemorySeriesStorage
|
||||
numHeadChunks: prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: subsystem,
|
||||
Name: "num_head_chunks_open",
|
||||
Name: "open_head_chunks",
|
||||
Help: "The current number of open head chunks.",
|
||||
}),
|
||||
dirtySeries: prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
@ -379,15 +379,13 @@ func (s *MemorySeriesStorage) Start() (err error) {
|
||||
|
||||
log.Info("Loading series map and head chunks...")
|
||||
s.fpToSeries, s.numChunksToPersist, err = p.loadSeriesMapAndHeads()
|
||||
openHeadCount := 0
|
||||
for fp := range s.fpToSeries.fpIter() {
|
||||
if series, ok := s.fpToSeries.get(fp); ok {
|
||||
if !series.headChunkClosed {
|
||||
openHeadCount++
|
||||
s.numHeadChunks.Inc()
|
||||
}
|
||||
}
|
||||
}
|
||||
s.numHeadChunks.Set(float64(openHeadCount))
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user