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

Function addPIndexStats

ns_server.go:603–614  ·  view source on GitHub ↗
(pindex *cbgt.PIndex, nsIndexStat map[string]interface{})

Source from the content-addressed store, hash-verified

601}
602
603func addPIndexStats(pindex *cbgt.PIndex, nsIndexStat map[string]interface{}) error {
604 if destForwarder, ok := pindex.Dest.(*cbgt.DestForwarder); ok {
605 if bp, ok := destForwarder.DestProvider.(*BleveDest); ok {
606 bpsm, err := bp.StatsMap()
607 if err != nil {
608 return err
609 }
610 return extractStats(bpsm, nsIndexStat)
611 }
612 }
613 return nil
614}
615
616func updateStat(name string, val float64, nsIndexStat map[string]interface{}) {
617 oldValue, ok := nsIndexStat[name]

Calls 2

extractStatsFunction · 0.85
StatsMapMethod · 0.45