mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/storage: rename *AssistedMerges to *AssistedMergesCount in order to make these field names less misleading
These fields are counters, not gauges, so adding Count suffix to them makes easier to understand this while reading the code
This commit is contained in:
parent
806c07ddd5
commit
c3a585cfe5
2 changed files with 10 additions and 10 deletions
|
@ -496,8 +496,8 @@ func writeStorageMetrics(w io.Writer, strg *storage.Storage) {
|
||||||
metrics.WriteCounterUint64(w, `vm_composite_filter_success_conversions_total`, idbm.CompositeFilterSuccessConversions)
|
metrics.WriteCounterUint64(w, `vm_composite_filter_success_conversions_total`, idbm.CompositeFilterSuccessConversions)
|
||||||
metrics.WriteCounterUint64(w, `vm_composite_filter_missing_conversions_total`, idbm.CompositeFilterMissingConversions)
|
metrics.WriteCounterUint64(w, `vm_composite_filter_missing_conversions_total`, idbm.CompositeFilterMissingConversions)
|
||||||
|
|
||||||
metrics.WriteCounterUint64(w, `vm_assisted_merges_total{type="storage/inmemory"}`, tm.InmemoryAssistedMerges)
|
metrics.WriteCounterUint64(w, `vm_assisted_merges_total{type="storage/inmemory"}`, tm.InmemoryAssistedMergesCount)
|
||||||
metrics.WriteCounterUint64(w, `vm_assisted_merges_total{type="storage/small"}`, tm.SmallAssistedMerges)
|
metrics.WriteCounterUint64(w, `vm_assisted_merges_total{type="storage/small"}`, tm.SmallAssistedMergesCount)
|
||||||
|
|
||||||
metrics.WriteCounterUint64(w, `vm_assisted_merges_total{type="indexdb/inmemory"}`, idbm.InmemoryAssistedMergesCount)
|
metrics.WriteCounterUint64(w, `vm_assisted_merges_total{type="indexdb/inmemory"}`, idbm.InmemoryAssistedMergesCount)
|
||||||
metrics.WriteCounterUint64(w, `vm_assisted_merges_total{type="indexdb/file"}`, idbm.FileAssistedMergesCount)
|
metrics.WriteCounterUint64(w, `vm_assisted_merges_total{type="indexdb/file"}`, idbm.FileAssistedMergesCount)
|
||||||
|
|
|
@ -117,8 +117,8 @@ type partition struct {
|
||||||
smallRowsDeleted uint64
|
smallRowsDeleted uint64
|
||||||
bigRowsDeleted uint64
|
bigRowsDeleted uint64
|
||||||
|
|
||||||
inmemoryAssistedMerges uint64
|
inmemoryAssistedMergesCount uint64
|
||||||
smallAssistedMerges uint64
|
smallAssistedMergesCount uint64
|
||||||
|
|
||||||
mergeIdx uint64
|
mergeIdx uint64
|
||||||
|
|
||||||
|
@ -350,8 +350,8 @@ type partitionMetrics struct {
|
||||||
SmallPartsRefCount uint64
|
SmallPartsRefCount uint64
|
||||||
BigPartsRefCount uint64
|
BigPartsRefCount uint64
|
||||||
|
|
||||||
InmemoryAssistedMerges uint64
|
InmemoryAssistedMergesCount uint64
|
||||||
SmallAssistedMerges uint64
|
SmallAssistedMergesCount uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
// TotalRowsCount returns total number of rows in tm.
|
// TotalRowsCount returns total number of rows in tm.
|
||||||
|
@ -415,8 +415,8 @@ func (pt *partition) UpdateMetrics(m *partitionMetrics) {
|
||||||
m.SmallRowsDeleted += atomic.LoadUint64(&pt.smallRowsDeleted)
|
m.SmallRowsDeleted += atomic.LoadUint64(&pt.smallRowsDeleted)
|
||||||
m.BigRowsDeleted += atomic.LoadUint64(&pt.bigRowsDeleted)
|
m.BigRowsDeleted += atomic.LoadUint64(&pt.bigRowsDeleted)
|
||||||
|
|
||||||
m.InmemoryAssistedMerges += atomic.LoadUint64(&pt.inmemoryAssistedMerges)
|
m.InmemoryAssistedMergesCount += atomic.LoadUint64(&pt.inmemoryAssistedMergesCount)
|
||||||
m.SmallAssistedMerges += atomic.LoadUint64(&pt.smallAssistedMerges)
|
m.SmallAssistedMergesCount += atomic.LoadUint64(&pt.smallAssistedMergesCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddRows adds the given rows to the partition pt.
|
// AddRows adds the given rows to the partition pt.
|
||||||
|
@ -641,7 +641,7 @@ func (pt *partition) assistedMergeForInmemoryParts() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
atomic.AddUint64(&pt.inmemoryAssistedMerges, 1)
|
atomic.AddUint64(&pt.inmemoryAssistedMergesCount, 1)
|
||||||
err := pt.mergeInmemoryParts()
|
err := pt.mergeInmemoryParts()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return
|
return
|
||||||
|
@ -660,7 +660,7 @@ func (pt *partition) assistedMergeForSmallParts() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
atomic.AddUint64(&pt.smallAssistedMerges, 1)
|
atomic.AddUint64(&pt.smallAssistedMergesCount, 1)
|
||||||
err := pt.mergeExistingParts(false)
|
err := pt.mergeExistingParts(false)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue