MCPcopy Create free account
hub / github.com/couchbase/cbft / updateStat

Function updateStat

ns_server.go:616–625  ·  view source on GitHub ↗
(name string, val float64, nsIndexStat map[string]interface{})

Source from the content-addressed store, hash-verified

614}
615
616func updateStat(name string, val float64, nsIndexStat map[string]interface{}) {
617 oldValue, ok := nsIndexStat[name]
618 if ok {
619 switch oldValue := oldValue.(type) {
620 case float64:
621 oldValue += val
622 nsIndexStat[name] = oldValue
623 }
624 }
625}
626
627func extractStats(bpsm, nsIndexStat map[string]interface{}) error {
628 // common stats across different index types

Callers 5

extractStatsFunction · 0.85
extractMetricsStatsFunction · 0.85
extractMossStatsFunction · 0.85
extractKVStatsFunction · 0.85
extractScorchStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected