mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
app/vmstorage: export vm_composite_index_min_timestamp metric
This commit is contained in:
parent
b27288f1b0
commit
08f21d8761
@ -329,6 +329,9 @@ func registerStorageMetrics(strg *storage.Storage) {
|
|||||||
metrics.NewGauge(`vm_index_blocks_with_metric_ids_incorrect_order_total`, func() float64 {
|
metrics.NewGauge(`vm_index_blocks_with_metric_ids_incorrect_order_total`, func() float64 {
|
||||||
return float64(idbm().IndexBlocksWithMetricIDsIncorrectOrder)
|
return float64(idbm().IndexBlocksWithMetricIDsIncorrectOrder)
|
||||||
})
|
})
|
||||||
|
metrics.NewGauge(`vm_composite_index_min_timestamp`, func() float64 {
|
||||||
|
return float64(idbm().MinTimestampForCompositeIndex) / 1e3
|
||||||
|
})
|
||||||
|
|
||||||
metrics.NewGauge(`vm_assisted_merges_total{type="storage/small"}`, func() float64 {
|
metrics.NewGauge(`vm_assisted_merges_total{type="storage/small"}`, func() float64 {
|
||||||
return float64(tm().SmallAssistedMerges)
|
return float64(tm().SmallAssistedMerges)
|
||||||
|
@ -203,6 +203,8 @@ type IndexDBMetrics struct {
|
|||||||
IndexBlocksWithMetricIDsProcessed uint64
|
IndexBlocksWithMetricIDsProcessed uint64
|
||||||
IndexBlocksWithMetricIDsIncorrectOrder uint64
|
IndexBlocksWithMetricIDsIncorrectOrder uint64
|
||||||
|
|
||||||
|
MinTimestampForCompositeIndex uint64
|
||||||
|
|
||||||
mergeset.TableMetrics
|
mergeset.TableMetrics
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,6 +246,8 @@ func (db *indexDB) UpdateMetrics(m *IndexDBMetrics) {
|
|||||||
m.IndexBlocksWithMetricIDsProcessed = atomic.LoadUint64(&indexBlocksWithMetricIDsProcessed)
|
m.IndexBlocksWithMetricIDsProcessed = atomic.LoadUint64(&indexBlocksWithMetricIDsProcessed)
|
||||||
m.IndexBlocksWithMetricIDsIncorrectOrder = atomic.LoadUint64(&indexBlocksWithMetricIDsIncorrectOrder)
|
m.IndexBlocksWithMetricIDsIncorrectOrder = atomic.LoadUint64(&indexBlocksWithMetricIDsIncorrectOrder)
|
||||||
|
|
||||||
|
m.MinTimestampForCompositeIndex = uint64(db.minTimestampForCompositeIndex)
|
||||||
|
|
||||||
db.tb.UpdateMetrics(&m.TableMetrics)
|
db.tb.UpdateMetrics(&m.TableMetrics)
|
||||||
db.doExtDB(func(extDB *indexDB) {
|
db.doExtDB(func(extDB *indexDB) {
|
||||||
extDB.tb.UpdateMetrics(&m.TableMetrics)
|
extDB.tb.UpdateMetrics(&m.TableMetrics)
|
||||||
|
Loading…
Reference in New Issue
Block a user