(name string, val float64, nsIndexStat map[string]interface{})
| 614 | } |
| 615 | |
| 616 | func 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 | |
| 627 | func extractStats(bpsm, nsIndexStat map[string]interface{}) error { |
| 628 | // common stats across different index types |
no outgoing calls
no test coverage detected