[MM-25385] Add group_count_with_allow_reference telemetry (#14614)

* MM-25385 Add group_count_with_allow_reference telemetry

* Add store layers

* Fix tests

* Fix linting
Этот коммит содержится в:
Farhan Munshi
2020-05-22 10:56:15 -04:00
коммит произвёл GitHub
родитель 33bfebc797
Коммит b0d74c4e40
7 изменённых файлов: 118 добавлений и 11 удалений

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

@@ -3150,6 +3150,22 @@ func (s *TimerLayerGroupStore) GroupCount() (int64, *model.AppError) {
return resultVar0, resultVar1
}
func (s *TimerLayerGroupStore) GroupCountWithAllowReference() (int64, *model.AppError) {
start := timemodule.Now()
resultVar0, resultVar1 := s.GroupStore.GroupCountWithAllowReference()
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {
success := "false"
if resultVar1 == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GroupCountWithAllowReference", success, elapsed)
}
return resultVar0, resultVar1
}
func (s *TimerLayerGroupStore) GroupMemberCount() (int64, *model.AppError) {
start := timemodule.Now()