MM-28733 : Admin Advisor v2 (#15515)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7c905b0890
Коммит
f74b86ae95
@@ -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()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user