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

Function extractScorchStats

ns_server.go:755–766  ·  view source on GitHub ↗
(sstats, nsIndexStat map[string]interface{})

Source from the content-addressed store, hash-verified

753}
754
755func extractScorchStats(sstats, nsIndexStat map[string]interface{}) error {
756 for path, statname := range scorchStats {
757 v := jsonpointer.Get(sstats, path)
758 if vuint64, ok := v.(uint64); ok {
759 updateStat(statname, float64(vuint64), nsIndexStat)
760 } else if fuint64, ok := v.(float64); ok {
761 updateStat(statname, float64(fuint64), nsIndexStat)
762 }
763 }
764
765 return nil
766}
767
768func massageStats(buffer *bytes.Buffer, nsIndexStat map[string]interface{}) error {
769 statsBytes := buffer.Bytes()

Callers 1

extractStatsFunction · 0.85

Calls 2

updateStatFunction · 0.85
GetMethod · 0.80

Tested by

no test coverage detected