[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
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
33bfebc797
Коммит
b0d74c4e40
@@ -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()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user