* Add mobile metrics

* Fix mocks

* Add tests

* Fix lint

* Address feedback

* Fix lint

* Fix test

* Fix CI

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Daniel Espino García
2024-06-12 11:33:04 +02:00
коммит произвёл GitHub
родитель 691386a814
Коммит 1ec2de4a95
8 изменённых файлов: 250 добавлений и 0 удалений

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

@@ -114,4 +114,7 @@ type MetricsInterface interface {
ObserveClientTeamSwitchDuration(platform, agent string, elapsed float64)
ObserveClientRHSLoadDuration(platform, agent string, elapsed float64)
ObserveGlobalThreadsLoadDuration(platform, agent string, elapsed float64)
ObserveMobileClientLoadDuration(platform string, elapsed float64)
ObserveMobileClientChannelSwitchDuration(platform string, elapsed float64)
ObserveMobileClientTeamSwitchDuration(platform string, elapsed float64)
}

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

@@ -363,6 +363,21 @@ func (_m *MetricsInterface) ObserveGlobalThreadsLoadDuration(platform string, ag
_m.Called(platform, agent, elapsed)
}
// ObserveMobileClientChannelSwitchDuration provides a mock function with given fields: platform, elapsed
func (_m *MetricsInterface) ObserveMobileClientChannelSwitchDuration(platform string, elapsed float64) {
_m.Called(platform, elapsed)
}
// ObserveMobileClientLoadDuration provides a mock function with given fields: platform, elapsed
func (_m *MetricsInterface) ObserveMobileClientLoadDuration(platform string, elapsed float64) {
_m.Called(platform, elapsed)
}
// ObserveMobileClientTeamSwitchDuration provides a mock function with given fields: platform, elapsed
func (_m *MetricsInterface) ObserveMobileClientTeamSwitchDuration(platform string, elapsed float64) {
_m.Called(platform, elapsed)
}
// ObservePluginAPIDuration provides a mock function with given fields: pluginID, apiName, success, elapsed
func (_m *MetricsInterface) ObservePluginAPIDuration(pluginID string, apiName string, success bool, elapsed float64) {
_m.Called(pluginID, apiName, success, elapsed)