mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 14:57:40 -08:00
Instrument series maintenance.
Change-Id: Ie4269d07ad4d23d44230c95a523088b472718e54
This commit is contained in:
parent
371445f4da
commit
2672aa8ece
|
@ -51,6 +51,8 @@ const (
|
|||
unarchive = "unarchive"
|
||||
memoryPurge = "purge_from_memory"
|
||||
archivePurge = "purge_from_archive"
|
||||
memoryMaintenance = "maintenance_in_memory"
|
||||
archiveMaintenance = "maintenance_in_archive"
|
||||
|
||||
// Op-types for chunkOps.
|
||||
createAndPin = "create" // A chunkDesc creation with refCount=1.
|
||||
|
|
|
@ -580,8 +580,10 @@ loop:
|
|||
case fp := <-memoryFingerprints:
|
||||
s.purgeSeries(fp, clientmodel.TimestampFromTime(time.Now()).Add(-1*s.purgeAfter))
|
||||
// TODO: Move chunkdesc eviction and archiving here.
|
||||
s.seriesOps.WithLabelValues(memoryMaintenance).Inc()
|
||||
case fp := <-archivedFingerprints:
|
||||
s.purgeSeries(fp, clientmodel.TimestampFromTime(time.Now()).Add(-1*s.purgeAfter))
|
||||
s.seriesOps.WithLabelValues(archiveMaintenance).Inc()
|
||||
}
|
||||
}
|
||||
// Wait until both channels are closed.
|
||||
|
|
Loading…
Reference in a new issue