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

Function extractKVStats

ns_server.go:730–740  ·  view source on GitHub ↗
(kvs, nsIndexStat map[string]interface{})

Source from the content-addressed store, hash-verified

728}
729
730func extractKVStats(kvs, nsIndexStat map[string]interface{}) error {
731 for path, statname := range kvStats {
732 v := jsonpointer.Get(kvs, path)
733 if vint, ok := v.(int); ok {
734 updateStat(statname, float64(vint), nsIndexStat)
735 } else if vuint64, ok := v.(uint64); ok {
736 updateStat(statname, float64(vuint64), nsIndexStat)
737 }
738 }
739 return nil
740}
741
742var scorchStats = map[string]string{
743 "/num_bytes_used_disk": "num_bytes_used_disk",

Callers 1

extractStatsFunction · 0.85

Calls 2

updateStatFunction · 0.85
GetMethod · 0.80

Tested by

no test coverage detected