MM-23646: Improve group sync performance. (#14171)

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Martin Kraft
2020-04-21 15:55:30 -04:00
коммит произвёл GitHub
родитель d9713792ba
Коммит 70e9647e85
6 изменённых файлов: 79 добавлений и 0 удалений

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

@@ -6695,6 +6695,22 @@ func (s *TimerLayerUserStore) GetAllAfter(limit int, afterId string) ([]*model.U
return resultVar0, resultVar1
}
func (s *TimerLayerUserStore) GetAllNotInAuthService(authServices []string) ([]*model.User, *model.AppError) {
start := timemodule.Now()
resultVar0, resultVar1 := s.UserStore.GetAllNotInAuthService(authServices)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {
success := "false"
if resultVar1 == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetAllNotInAuthService", success, elapsed)
}
return resultVar0, resultVar1
}
func (s *TimerLayerUserStore) GetAllProfiles(options *model.UserGetOptions) ([]*model.User, *model.AppError) {
start := timemodule.Now()