mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 07:34:04 -08:00
Instrument series maintenance.
Change-Id: Ie4269d07ad4d23d44230c95a523088b472718e54
This commit is contained in:
parent
371445f4da
commit
2672aa8ece
|
@ -46,11 +46,13 @@ const (
|
|||
opTypeLabel = "type"
|
||||
|
||||
// Op-types for seriesOps.
|
||||
create = "create"
|
||||
archive = "archive"
|
||||
unarchive = "unarchive"
|
||||
memoryPurge = "purge_from_memory"
|
||||
archivePurge = "purge_from_archive"
|
||||
create = "create"
|
||||
archive = "archive"
|
||||
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