mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Use consistent metric name convention
This commit is contained in:
parent
70111b5604
commit
b1adcd91fc
3 changed files with 40 additions and 41 deletions
|
|
@ -2249,7 +2249,7 @@ func (f *fragment) Snapshot() error {
|
|||
func track(start time.Time, message string, stats stats.StatsClient, logger logger.Logger) {
|
||||
elapsed := time.Since(start)
|
||||
logger.Debugf("%s took %s", message, elapsed)
|
||||
stats.Histogram(MetricSnapshot, elapsed.Seconds(), 1.0)
|
||||
stats.Histogram(MetricSnapshotDuration, elapsed.Seconds(), 1.0)
|
||||
}
|
||||
|
||||
// snapshot does the actual snapshot operation. it does not check or care
|
||||
|
|
|
|||
|
|
@ -801,10 +801,10 @@ func (s *holderSyncer) SyncHolder() error {
|
|||
}
|
||||
}
|
||||
}
|
||||
s.Stats.Histogram(MetricSyncField, float64(time.Since(tf)), 1.0)
|
||||
s.Stats.Histogram(MetricSyncFieldDuration, float64(time.Since(tf)), 1.0)
|
||||
tf = time.Now() // reset tf
|
||||
}
|
||||
s.Stats.Histogram(MetricSyncIndex, float64(time.Since(ti)), 1.0)
|
||||
s.Stats.Histogram(MetricSyncIndexDuration, float64(time.Since(ti)), 1.0)
|
||||
ti = time.Now() // reset ti
|
||||
}
|
||||
|
||||
|
|
|
|||
75
metrics.go
75
metrics.go
|
|
@ -1,48 +1,47 @@
|
|||
package pilosa
|
||||
|
||||
const (
|
||||
MetricCreateIndex = "createIndex"
|
||||
MetricDeleteIndex = "deleteIndex"
|
||||
MetricCreateField = "createField"
|
||||
MetricDeleteField = "deleteField"
|
||||
MetricDeleteAvailableShard = "deleteAvailableShard"
|
||||
MetricRecalculateCache = "cache.recalculate"
|
||||
MetricInvalidateCache = "cache.invalidate"
|
||||
MetricRankCacheLength = "RankCache"
|
||||
MetricCacheThresholdReached = "cache.threshold"
|
||||
MetricRow = "range"
|
||||
MetricRowBSI = "range:bsigroup"
|
||||
MetricSetRowAttrs = "SetRowAttrs"
|
||||
MetricSetProfileAttrs = "SetProfileAttrs"
|
||||
MetricCreateIndex = "create_index_total"
|
||||
MetricDeleteIndex = "delete_index_total"
|
||||
MetricCreateField = "create_field_total"
|
||||
MetricDeleteField = "delete_field_total"
|
||||
MetricDeleteAvailableShard = "delete_available_shard_total"
|
||||
MetricRecalculateCache = "recalculate_cache_total"
|
||||
MetricInvalidateCache = "invalidate_cache_total"
|
||||
MetricRankCacheLength = "rank_cache_length"
|
||||
MetricCacheThresholdReached = "cache_threshold_reached_total"
|
||||
MetricRow = "query_row_total"
|
||||
MetricRowBSI = "query_row_bsi_total"
|
||||
MetricSetRowAttrs = "query_set_row_attrs_total"
|
||||
MetricSetProfileAttrs = "query_set_profile_attrs_total"
|
||||
MetricMaximumRow = "maximum_row"
|
||||
MetricSetBit = "setBit"
|
||||
MetricRows = "rows"
|
||||
MetricClearBit = "clearBit"
|
||||
MetricSetRow = "setRow"
|
||||
MetricClearRow = "clearRow"
|
||||
MetricImportingN = "ImportingN"
|
||||
MetricImportedN = "ImportedN"
|
||||
MetricClearingN = "ClearingN"
|
||||
MetricClearedN = "ClearedN"
|
||||
MetricSnapshot = "snapshot"
|
||||
MetricBlockRepairPrimary = "BlockRepairPrimary"
|
||||
MetricBlockRepair = "BlockRepair"
|
||||
MetricSyncField = "syncField"
|
||||
MetricSyncIndex = "syncIndex"
|
||||
MetricSetBit = "set_bit_total"
|
||||
MetricClearBit = "clear_bit_total"
|
||||
MetricSetRow = "set_row_total"
|
||||
MetricClearRow = "clear_row_total"
|
||||
MetricImportingN = "importing_total"
|
||||
MetricImportedN = "imported_total"
|
||||
MetricClearingN = "clearing_total"
|
||||
MetricClearedN = "cleared_total"
|
||||
MetricSnapshotDuration = "snapshot_duration_seconds"
|
||||
MetricBlockRepairPrimary = "block_repair_primary_total"
|
||||
MetricBlockRepair = "block_repair_total"
|
||||
MetricSyncFieldDuration = "sync_field_duration_seconds"
|
||||
MetricSyncIndexDuration = "sync_index_duration_seconds"
|
||||
MetricColumnAttrStoreBlocks = "ColumnAttrStoreBlocks"
|
||||
MetricColumnAttrDiff = "ColumnAttrDiff"
|
||||
MetricRowAttrStoreBlocks = "RowAttrStoreBlocks"
|
||||
MetricRowAttrDiff = "RowAttrDiff"
|
||||
MetricHttpRequest = "http.request"
|
||||
MetricMaxShard = "maxShard"
|
||||
MetricAntiEntropy = "AntiEntropy"
|
||||
MetricAntiEntropyDuration = "AntiEntropyDuration"
|
||||
MetricGarbageCollection = "garbage_collection"
|
||||
MetricHttpRequest = "http_request_total"
|
||||
MetricMaxShard = "maximum_shard"
|
||||
MetricAntiEntropy = "antientropy_total"
|
||||
MetricAntiEntropyDuration = "antientropy_duration_seconds"
|
||||
MetricGarbageCollection = "garbage_collection_total"
|
||||
MetricGoroutines = "goroutines"
|
||||
MetricOpenFiles = "OpenFiles"
|
||||
MetricHeapAlloc = "HeapAlloc"
|
||||
MetricHeapInuse = "HeapInuse"
|
||||
MetricStackInuse = "StackInuse"
|
||||
MetricMallocs = "Mallocs"
|
||||
MetricFrees = "Frees"
|
||||
MetricOpenFiles = "open_files"
|
||||
MetricHeapAlloc = "heap_alloc"
|
||||
MetricHeapInuse = "heap_inuse"
|
||||
MetricStackInuse = "stack_inuse"
|
||||
MetricMallocs = "mallocs"
|
||||
MetricFrees = "frees"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue