Этот коммит содержится в:
catalintomai
2020-09-25 14:59:41 -07:00
коммит произвёл GitHub
родитель 7c905b0890
Коммит f74b86ae95
18 изменённых файлов: 878 добавлений и 124 удалений

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

@@ -5920,6 +5920,22 @@ func (s *TimerLayerSystemStore) SaveOrUpdate(system *model.System) error {
return err
}
func (s *TimerLayerSystemStore) SaveOrUpdateWithWarnMetricHandling(system *model.System) error {
start := timemodule.Now()
err := s.SystemStore.SaveOrUpdateWithWarnMetricHandling(system)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {
success := "false"
if err == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("SystemStore.SaveOrUpdateWithWarnMetricHandling", success, elapsed)
}
return err
}
func (s *TimerLayerSystemStore) Update(system *model.System) error {
start := timemodule.Now()
@@ -7005,6 +7021,22 @@ func (s *TimerLayerUserStore) AnalyticsActiveCount(time int64, options model.Use
return result, err
}
func (s *TimerLayerUserStore) AnalyticsGetExternalUsers(hostDomain string) (bool, *model.AppError) {
start := timemodule.Now()
result, err := s.UserStore.AnalyticsGetExternalUsers(hostDomain)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {
success := "false"
if err == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("UserStore.AnalyticsGetExternalUsers", success, elapsed)
}
return result, err
}
func (s *TimerLayerUserStore) AnalyticsGetGuestCount() (int64, *model.AppError) {
start := timemodule.Now()