MM-43082: Added new telemetry values for groups. (#19918)

Этот коммит содержится в:
mkraft
2022-04-08 11:25:40 -04:00
коммит произвёл GitHub
родитель 1418828443
Коммит 0e4b0b6939
8 изменённых файлов: 96 добавлений и 0 удалений

Просмотреть файл

@@ -3835,6 +3835,22 @@ func (s *TimerLayerGroupStore) GroupCount() (int64, error) {
return result, err
}
func (s *TimerLayerGroupStore) GroupCountBySource(source model.GroupSource) (int64, error) {
start := timemodule.Now()
result, err := s.GroupStore.GroupCountBySource(source)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {
success := "false"
if err == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GroupCountBySource", success, elapsed)
}
return result, err
}
func (s *TimerLayerGroupStore) GroupCountWithAllowReference() (int64, error) {
start := timemodule.Now()