mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-21 05:54:10 +08:00
* ci: standardize checkout action inputs across workflows (#36876) * ci: standardize checkout action inputs across workflows * ci: checkout in claude pipeline use default * ci: make setup-go-work a Makefile prereq, remove explicit CI steps (#37268) * ci: auto-build missing buildenv images for in-flight Go version bumps (#37286) * ci: replace volatile e2e-platform-pkgs cache with shared webapp-setup (#37182) * ci: replace volatile e2e-platform-pkgs cache with shared webapp-setup * ci: replace volatile e2e-platform-pkgs cache in cypress template v2 * ci: tighten prep-deps comments * fix: typo in webapp-setup comment * chore(ci): warm node and npm caches daily; make CI jobs restore read-only (#37393) * chore(ci): warm node and npm caches daily; make CI jobs restore read-only Add daily scheduled workflows on master that warm two independent caches, each in its own workflow mirroring its consumers: - webapp-ci-cache-warm.yml warms the webapp node_modules cache (keyed on webapp/package-lock.json) - e2e-ci-cache-warm.yml warms the E2E ~/.npm registry cache (keyed on the cypress/playwright/api lockfiles) Webapp CI and the E2E/api CI jobs now restore these caches read-only instead of writing them, so the daily jobs keep the caches warm. The E2E ~/.npm restore is factored into a reusable restore-e2e-npm-cache composite action, and webapp-setup gains a read-only mode for the node_modules cache. * chore(ci): guard cache-warm workflows with a concurrency group * chore(ci): drop unused node-cache-dependency-path output * chore(ci): reuse webapp-setup for node_modules in e2e-tests-check * Move e2e npm registry cache out of the node-cache- namespace (#37427) The e2e npm registry cache keyed on node-cache-<os>-<arch>-npm-e2e-, sharing the node-cache- prefix that actions/setup-node generates automatically for its built-in npm cache (node-cache-<os>-<arch>-npm-). Because the arch segment differs only by case (setup-node uses Node's process.arch 'x64'; this action uses runner.arch 'X64') and GitHub matches restore-key prefixes case-insensitively, the two buckets share a common prefix. A future broad restore-key such as node-cache-<os>-<arch>-npm- could then cross-restore one bucket's ~/.npm into the other. Rename the key to e2e-npm-registry-<os>-<arch>-, giving it a distinct namespace that is not a prefix of node-cache- in either direction and matches the repo's content-descriptive e2e cache keys (e2e-cypress-deps-, e2e-playwright-deps-, e2e-platform-pkgs-). Existing entries orphan and age out; the daily warm job repopulates under the new key on next run. * Adopt per-target .PHONY directives in server Makefiles (#37447) * Converge generated-file CI checks on a single make generated target The server-ci.yml workflow had many separate "run a make target, then fail on any git diff" jobs, but make generated only covered a few of them, so the target and CI drifted apart. Expand make generated to regenerate every committed asset, adding gen-serialized, migrations-extract, build-templates, mmctl-docs, and modules-tidy, and collapse the per-asset check jobs into a single check-generated job. Split the backport migration guard into its own check-backport-migrations job and make target, renaming the script to match. * make generated * git status --porcelain * simplify permissions block given defaults --------- Co-authored-by: Nuno Simões <nuno.simoes@mattermost.com>
638 lines
28 KiB
Go
638 lines
28 KiB
Go
// Code generated by mockery v2.53.4. DO NOT EDIT.
|
|
|
|
// Regenerate this file using `make einterfaces-mocks`.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
sql "database/sql"
|
|
|
|
logr "github.com/mattermost/logr/v2"
|
|
model "github.com/mattermost/mattermost/server/public/model"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// MetricsInterface is an autogenerated mock type for the MetricsInterface type
|
|
type MetricsInterface struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// AddAutoTranslateRecoveryStuckFound provides a mock function with given fields: count
|
|
func (_m *MetricsInterface) AddAutoTranslateRecoveryStuckFound(count float64) {
|
|
_m.Called(count)
|
|
}
|
|
|
|
// AddMemCacheHitCounter provides a mock function with given fields: cacheName, amount
|
|
func (_m *MetricsInterface) AddMemCacheHitCounter(cacheName string, amount float64) {
|
|
_m.Called(cacheName, amount)
|
|
}
|
|
|
|
// AddMemCacheMissCounter provides a mock function with given fields: cacheName, amount
|
|
func (_m *MetricsInterface) AddMemCacheMissCounter(cacheName string, amount float64) {
|
|
_m.Called(cacheName, amount)
|
|
}
|
|
|
|
// ClearMobileClientSessionMetadata provides a mock function with no fields
|
|
func (_m *MetricsInterface) ClearMobileClientSessionMetadata() {
|
|
_m.Called()
|
|
}
|
|
|
|
// DecrementHTTPWebSockets provides a mock function with given fields: originClient
|
|
func (_m *MetricsInterface) DecrementHTTPWebSockets(originClient string) {
|
|
_m.Called(originClient)
|
|
}
|
|
|
|
// DecrementJobActive provides a mock function with given fields: jobType
|
|
func (_m *MetricsInterface) DecrementJobActive(jobType string) {
|
|
_m.Called(jobType)
|
|
}
|
|
|
|
// DecrementWebSocketBroadcastBufferSize provides a mock function with given fields: hub, amount
|
|
func (_m *MetricsInterface) DecrementWebSocketBroadcastBufferSize(hub string, amount float64) {
|
|
_m.Called(hub, amount)
|
|
}
|
|
|
|
// DecrementWebSocketBroadcastUsersRegistered provides a mock function with given fields: hub, amount
|
|
func (_m *MetricsInterface) DecrementWebSocketBroadcastUsersRegistered(hub string, amount float64) {
|
|
_m.Called(hub, amount)
|
|
}
|
|
|
|
// GetLoggerMetricsCollector provides a mock function with no fields
|
|
func (_m *MetricsInterface) GetLoggerMetricsCollector() logr.MetricsCollector {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetLoggerMetricsCollector")
|
|
}
|
|
|
|
var r0 logr.MetricsCollector
|
|
if rf, ok := ret.Get(0).(func() logr.MetricsCollector); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(logr.MetricsCollector)
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// IncrementAccessControlCacheInvalidation provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementAccessControlCacheInvalidation() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementAutoTranslateNormHash provides a mock function with given fields: result
|
|
func (_m *MetricsInterface) IncrementAutoTranslateNormHash(result string) {
|
|
_m.Called(result)
|
|
}
|
|
|
|
// IncrementChannelIndexCounter provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementChannelIndexCounter() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementClientLongTasks provides a mock function with given fields: platform, agent, userID, inc
|
|
func (_m *MetricsInterface) IncrementClientLongTasks(platform string, agent string, userID string, inc float64) {
|
|
_m.Called(platform, agent, userID, inc)
|
|
}
|
|
|
|
// IncrementClusterEventType provides a mock function with given fields: eventType
|
|
func (_m *MetricsInterface) IncrementClusterEventType(eventType model.ClusterEvent) {
|
|
_m.Called(eventType)
|
|
}
|
|
|
|
// IncrementClusterRequest provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementClusterRequest() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementEtagHitCounter provides a mock function with given fields: route
|
|
func (_m *MetricsInterface) IncrementEtagHitCounter(route string) {
|
|
_m.Called(route)
|
|
}
|
|
|
|
// IncrementEtagMissCounter provides a mock function with given fields: route
|
|
func (_m *MetricsInterface) IncrementEtagMissCounter(route string) {
|
|
_m.Called(route)
|
|
}
|
|
|
|
// IncrementFileIndexCounter provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementFileIndexCounter() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementFilesSearchCounter provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementFilesSearchCounter() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementHTTPError provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementHTTPError() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementHTTPRequest provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementHTTPRequest() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementHTTPWebSockets provides a mock function with given fields: originClient
|
|
func (_m *MetricsInterface) IncrementHTTPWebSockets(originClient string) {
|
|
_m.Called(originClient)
|
|
}
|
|
|
|
// IncrementJobActive provides a mock function with given fields: jobType
|
|
func (_m *MetricsInterface) IncrementJobActive(jobType string) {
|
|
_m.Called(jobType)
|
|
}
|
|
|
|
// IncrementLogin provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementLogin() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementLoginFail provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementLoginFail() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementMemCacheHitCounter provides a mock function with given fields: cacheName
|
|
func (_m *MetricsInterface) IncrementMemCacheHitCounter(cacheName string) {
|
|
_m.Called(cacheName)
|
|
}
|
|
|
|
// IncrementMemCacheHitCounterSession provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementMemCacheHitCounterSession() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementMemCacheInvalidationCounter provides a mock function with given fields: cacheName
|
|
func (_m *MetricsInterface) IncrementMemCacheInvalidationCounter(cacheName string) {
|
|
_m.Called(cacheName)
|
|
}
|
|
|
|
// IncrementMemCacheInvalidationCounterSession provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementMemCacheInvalidationCounterSession() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementMemCacheMissCounter provides a mock function with given fields: cacheName
|
|
func (_m *MetricsInterface) IncrementMemCacheMissCounter(cacheName string) {
|
|
_m.Called(cacheName)
|
|
}
|
|
|
|
// IncrementMemCacheMissCounterSession provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementMemCacheMissCounterSession() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementNotificationAckCounter provides a mock function with given fields: notificationType, platform
|
|
func (_m *MetricsInterface) IncrementNotificationAckCounter(notificationType model.NotificationType, platform string) {
|
|
_m.Called(notificationType, platform)
|
|
}
|
|
|
|
// IncrementNotificationCounter provides a mock function with given fields: notificationType, platform
|
|
func (_m *MetricsInterface) IncrementNotificationCounter(notificationType model.NotificationType, platform string) {
|
|
_m.Called(notificationType, platform)
|
|
}
|
|
|
|
// IncrementNotificationErrorCounter provides a mock function with given fields: notificationType, errorReason, platform
|
|
func (_m *MetricsInterface) IncrementNotificationErrorCounter(notificationType model.NotificationType, errorReason model.NotificationReason, platform string) {
|
|
_m.Called(notificationType, errorReason, platform)
|
|
}
|
|
|
|
// IncrementNotificationNotSentCounter provides a mock function with given fields: notificationType, notSentReason, platform
|
|
func (_m *MetricsInterface) IncrementNotificationNotSentCounter(notificationType model.NotificationType, notSentReason model.NotificationReason, platform string) {
|
|
_m.Called(notificationType, notSentReason, platform)
|
|
}
|
|
|
|
// IncrementNotificationSuccessCounter provides a mock function with given fields: notificationType, platform
|
|
func (_m *MetricsInterface) IncrementNotificationSuccessCounter(notificationType model.NotificationType, platform string) {
|
|
_m.Called(notificationType, platform)
|
|
}
|
|
|
|
// IncrementNotificationUnsupportedCounter provides a mock function with given fields: notificationType, notSentReason, platform
|
|
func (_m *MetricsInterface) IncrementNotificationUnsupportedCounter(notificationType model.NotificationType, notSentReason model.NotificationReason, platform string) {
|
|
_m.Called(notificationType, notSentReason, platform)
|
|
}
|
|
|
|
// IncrementPostBroadcast provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementPostBroadcast() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementPostCreate provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementPostCreate() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementPostFileAttachment provides a mock function with given fields: count
|
|
func (_m *MetricsInterface) IncrementPostFileAttachment(count int) {
|
|
_m.Called(count)
|
|
}
|
|
|
|
// IncrementPostIndexCounter provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementPostIndexCounter() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementPostSentEmail provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementPostSentEmail() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementPostSentPush provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementPostSentPush() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementPostsSearchCounter provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementPostsSearchCounter() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementRemoteClusterConnStateChangeCounter provides a mock function with given fields: remoteID, online
|
|
func (_m *MetricsInterface) IncrementRemoteClusterConnStateChangeCounter(remoteID string, online bool) {
|
|
_m.Called(remoteID, online)
|
|
}
|
|
|
|
// IncrementRemoteClusterMsgErrorsCounter provides a mock function with given fields: remoteID, timeout
|
|
func (_m *MetricsInterface) IncrementRemoteClusterMsgErrorsCounter(remoteID string, timeout bool) {
|
|
_m.Called(remoteID, timeout)
|
|
}
|
|
|
|
// IncrementRemoteClusterMsgReceivedCounter provides a mock function with given fields: remoteID
|
|
func (_m *MetricsInterface) IncrementRemoteClusterMsgReceivedCounter(remoteID string) {
|
|
_m.Called(remoteID)
|
|
}
|
|
|
|
// IncrementRemoteClusterMsgSentCounter provides a mock function with given fields: remoteID
|
|
func (_m *MetricsInterface) IncrementRemoteClusterMsgSentCounter(remoteID string) {
|
|
_m.Called(remoteID)
|
|
}
|
|
|
|
// IncrementSharedChannelsSyncCounter provides a mock function with given fields: remoteID
|
|
func (_m *MetricsInterface) IncrementSharedChannelsSyncCounter(remoteID string) {
|
|
_m.Called(remoteID)
|
|
}
|
|
|
|
// IncrementUserIndexCounter provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementUserIndexCounter() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementWebSocketBroadcast provides a mock function with given fields: eventType
|
|
func (_m *MetricsInterface) IncrementWebSocketBroadcast(eventType model.WebsocketEventType) {
|
|
_m.Called(eventType)
|
|
}
|
|
|
|
// IncrementWebSocketBroadcastBufferSize provides a mock function with given fields: hub, amount
|
|
func (_m *MetricsInterface) IncrementWebSocketBroadcastBufferSize(hub string, amount float64) {
|
|
_m.Called(hub, amount)
|
|
}
|
|
|
|
// IncrementWebSocketBroadcastUsersRegistered provides a mock function with given fields: hub, amount
|
|
func (_m *MetricsInterface) IncrementWebSocketBroadcastUsersRegistered(hub string, amount float64) {
|
|
_m.Called(hub, amount)
|
|
}
|
|
|
|
// IncrementWebhookPost provides a mock function with no fields
|
|
func (_m *MetricsInterface) IncrementWebhookPost() {
|
|
_m.Called()
|
|
}
|
|
|
|
// IncrementWebsocketEvent provides a mock function with given fields: eventType
|
|
func (_m *MetricsInterface) IncrementWebsocketEvent(eventType model.WebsocketEventType) {
|
|
_m.Called(eventType)
|
|
}
|
|
|
|
// IncrementWebsocketReconnectEventWithDisconnectErrCode provides a mock function with given fields: eventType, disconnectErrCode
|
|
func (_m *MetricsInterface) IncrementWebsocketReconnectEventWithDisconnectErrCode(eventType string, disconnectErrCode string) {
|
|
_m.Called(eventType, disconnectErrCode)
|
|
}
|
|
|
|
// ObserveAPIEndpointDuration provides a mock function with given fields: endpoint, method, statusCode, originClient, pageLoadContext, elapsed
|
|
func (_m *MetricsInterface) ObserveAPIEndpointDuration(endpoint string, method string, statusCode string, originClient string, pageLoadContext string, elapsed float64) {
|
|
_m.Called(endpoint, method, statusCode, originClient, pageLoadContext, elapsed)
|
|
}
|
|
|
|
// ObserveAccessControlEvaluateDuration provides a mock function with given fields: value
|
|
func (_m *MetricsInterface) ObserveAccessControlEvaluateDuration(value float64) {
|
|
_m.Called(value)
|
|
}
|
|
|
|
// ObserveAccessControlExpressionCompileDuration provides a mock function with given fields: value
|
|
func (_m *MetricsInterface) ObserveAccessControlExpressionCompileDuration(value float64) {
|
|
_m.Called(value)
|
|
}
|
|
|
|
// ObserveAccessControlSearchQueryDuration provides a mock function with given fields: value
|
|
func (_m *MetricsInterface) ObserveAccessControlSearchQueryDuration(value float64) {
|
|
_m.Called(value)
|
|
}
|
|
|
|
// ObserveAutoTranslateLinguaDetectionDuration provides a mock function with given fields: elapsed
|
|
func (_m *MetricsInterface) ObserveAutoTranslateLinguaDetectionDuration(elapsed float64) {
|
|
_m.Called(elapsed)
|
|
}
|
|
|
|
// ObserveAutoTranslateProviderCallDuration provides a mock function with given fields: provider, result, elapsed
|
|
func (_m *MetricsInterface) ObserveAutoTranslateProviderCallDuration(provider string, result string, elapsed float64) {
|
|
_m.Called(provider, result, elapsed)
|
|
}
|
|
|
|
// ObserveAutoTranslateTranslateDuration provides a mock function with given fields: objectType, elapsed
|
|
func (_m *MetricsInterface) ObserveAutoTranslateTranslateDuration(objectType string, elapsed float64) {
|
|
_m.Called(objectType, elapsed)
|
|
}
|
|
|
|
// ObserveAutoTranslateWorkerTaskDuration provides a mock function with given fields: elapsed
|
|
func (_m *MetricsInterface) ObserveAutoTranslateWorkerTaskDuration(elapsed float64) {
|
|
_m.Called(elapsed)
|
|
}
|
|
|
|
// ObserveClientChannelSwitchDuration provides a mock function with given fields: platform, agent, fresh, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientChannelSwitchDuration(platform string, agent string, fresh string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, fresh, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientCumulativeLayoutShift provides a mock function with given fields: platform, agent, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientCumulativeLayoutShift(platform string, agent string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientFirstContentfulPaint provides a mock function with given fields: platform, agent, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientFirstContentfulPaint(platform string, agent string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientInteractionToNextPaint provides a mock function with given fields: platform, agent, interaction, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientInteractionToNextPaint(platform string, agent string, interaction string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, interaction, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientLargestContentfulPaint provides a mock function with given fields: platform, agent, region, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientLargestContentfulPaint(platform string, agent string, region string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, region, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientPageLoadDuration provides a mock function with given fields: platform, agent, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientPageLoadDuration(platform string, agent string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientRHSLoadDuration provides a mock function with given fields: platform, agent, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientRHSLoadDuration(platform string, agent string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientSplashScreenEnd provides a mock function with given fields: platform, agent, pageType, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientSplashScreenEnd(platform string, agent string, pageType string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, pageType, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientTeamSwitchDuration provides a mock function with given fields: platform, agent, fresh, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientTeamSwitchDuration(platform string, agent string, fresh string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, fresh, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientTimeToDomInteractive provides a mock function with given fields: platform, agent, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientTimeToDomInteractive(platform string, agent string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientTimeToFirstByte provides a mock function with given fields: platform, agent, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientTimeToFirstByte(platform string, agent string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClientTimeToLastByte provides a mock function with given fields: platform, agent, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveClientTimeToLastByte(platform string, agent string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, userID, elapsed)
|
|
}
|
|
|
|
// ObserveClusterReliableFallbackLength provides a mock function with given fields: event, length
|
|
func (_m *MetricsInterface) ObserveClusterReliableFallbackLength(event model.ClusterEvent, length int) {
|
|
_m.Called(event, length)
|
|
}
|
|
|
|
// ObserveClusterRequestDuration provides a mock function with given fields: elapsed
|
|
func (_m *MetricsInterface) ObserveClusterRequestDuration(elapsed float64) {
|
|
_m.Called(elapsed)
|
|
}
|
|
|
|
// ObserveDesktopCpuUsage provides a mock function with given fields: platform, version, process, usage
|
|
func (_m *MetricsInterface) ObserveDesktopCpuUsage(platform string, version string, process string, usage float64) {
|
|
_m.Called(platform, version, process, usage)
|
|
}
|
|
|
|
// ObserveDesktopMemoryUsage provides a mock function with given fields: platform, version, process, usage
|
|
func (_m *MetricsInterface) ObserveDesktopMemoryUsage(platform string, version string, process string, usage float64) {
|
|
_m.Called(platform, version, process, usage)
|
|
}
|
|
|
|
// ObserveEnabledUsers provides a mock function with given fields: users
|
|
func (_m *MetricsInterface) ObserveEnabledUsers(users int64) {
|
|
_m.Called(users)
|
|
}
|
|
|
|
// ObserveFilesSearchDuration provides a mock function with given fields: elapsed
|
|
func (_m *MetricsInterface) ObserveFilesSearchDuration(elapsed float64) {
|
|
_m.Called(elapsed)
|
|
}
|
|
|
|
// ObserveGlobalThreadsLoadDuration provides a mock function with given fields: platform, agent, userID, elapsed
|
|
func (_m *MetricsInterface) ObserveGlobalThreadsLoadDuration(platform string, agent string, userID string, elapsed float64) {
|
|
_m.Called(platform, agent, userID, 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)
|
|
}
|
|
|
|
// ObserveMobileClientNetworkRequestsAverageSpeed provides a mock function with given fields: platform, agent, networkRequestGroup, speed
|
|
func (_m *MetricsInterface) ObserveMobileClientNetworkRequestsAverageSpeed(platform string, agent string, networkRequestGroup string, speed float64) {
|
|
_m.Called(platform, agent, networkRequestGroup, speed)
|
|
}
|
|
|
|
// ObserveMobileClientNetworkRequestsEffectiveLatency provides a mock function with given fields: platform, agent, networkRequestGroup, latency
|
|
func (_m *MetricsInterface) ObserveMobileClientNetworkRequestsEffectiveLatency(platform string, agent string, networkRequestGroup string, latency float64) {
|
|
_m.Called(platform, agent, networkRequestGroup, latency)
|
|
}
|
|
|
|
// ObserveMobileClientNetworkRequestsElapsedTime provides a mock function with given fields: platform, agent, networkRequestGroup, elapsedTime
|
|
func (_m *MetricsInterface) ObserveMobileClientNetworkRequestsElapsedTime(platform string, agent string, networkRequestGroup string, elapsedTime float64) {
|
|
_m.Called(platform, agent, networkRequestGroup, elapsedTime)
|
|
}
|
|
|
|
// ObserveMobileClientNetworkRequestsLatency provides a mock function with given fields: platform, agent, networkRequestGroup, latency
|
|
func (_m *MetricsInterface) ObserveMobileClientNetworkRequestsLatency(platform string, agent string, networkRequestGroup string, latency float64) {
|
|
_m.Called(platform, agent, networkRequestGroup, latency)
|
|
}
|
|
|
|
// ObserveMobileClientNetworkRequestsTotalCompressedSize provides a mock function with given fields: platform, agent, networkRequestGroup, size
|
|
func (_m *MetricsInterface) ObserveMobileClientNetworkRequestsTotalCompressedSize(platform string, agent string, networkRequestGroup string, size float64) {
|
|
_m.Called(platform, agent, networkRequestGroup, size)
|
|
}
|
|
|
|
// ObserveMobileClientNetworkRequestsTotalParallelRequests provides a mock function with given fields: platform, agent, networkRequestGroup, count
|
|
func (_m *MetricsInterface) ObserveMobileClientNetworkRequestsTotalParallelRequests(platform string, agent string, networkRequestGroup string, count float64) {
|
|
_m.Called(platform, agent, networkRequestGroup, count)
|
|
}
|
|
|
|
// ObserveMobileClientNetworkRequestsTotalRequests provides a mock function with given fields: platform, agent, networkRequestGroup, count
|
|
func (_m *MetricsInterface) ObserveMobileClientNetworkRequestsTotalRequests(platform string, agent string, networkRequestGroup string, count float64) {
|
|
_m.Called(platform, agent, networkRequestGroup, count)
|
|
}
|
|
|
|
// ObserveMobileClientNetworkRequestsTotalSequentialRequests provides a mock function with given fields: platform, agent, networkRequestGroup, count
|
|
func (_m *MetricsInterface) ObserveMobileClientNetworkRequestsTotalSequentialRequests(platform string, agent string, networkRequestGroup string, count float64) {
|
|
_m.Called(platform, agent, networkRequestGroup, count)
|
|
}
|
|
|
|
// ObserveMobileClientNetworkRequestsTotalSize provides a mock function with given fields: platform, agent, networkRequestGroup, size
|
|
func (_m *MetricsInterface) ObserveMobileClientNetworkRequestsTotalSize(platform string, agent string, networkRequestGroup string, size float64) {
|
|
_m.Called(platform, agent, networkRequestGroup, size)
|
|
}
|
|
|
|
// ObserveMobileClientSessionMetadata provides a mock function with given fields: version, platform, value, notificationDisabled
|
|
func (_m *MetricsInterface) ObserveMobileClientSessionMetadata(version string, platform string, value float64, notificationDisabled string) {
|
|
_m.Called(version, platform, value, notificationDisabled)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// ObservePluginHookDuration provides a mock function with given fields: pluginID, hookName, success, elapsed
|
|
func (_m *MetricsInterface) ObservePluginHookDuration(pluginID string, hookName string, success bool, elapsed float64) {
|
|
_m.Called(pluginID, hookName, success, elapsed)
|
|
}
|
|
|
|
// ObservePluginMultiHookDuration provides a mock function with given fields: elapsed
|
|
func (_m *MetricsInterface) ObservePluginMultiHookDuration(elapsed float64) {
|
|
_m.Called(elapsed)
|
|
}
|
|
|
|
// ObservePluginMultiHookIterationDuration provides a mock function with given fields: pluginID, elapsed
|
|
func (_m *MetricsInterface) ObservePluginMultiHookIterationDuration(pluginID string, elapsed float64) {
|
|
_m.Called(pluginID, elapsed)
|
|
}
|
|
|
|
// ObservePluginWebappPerf provides a mock function with given fields: platform, agent, pluginID, pluginMetricLabel, elapsed
|
|
func (_m *MetricsInterface) ObservePluginWebappPerf(platform string, agent string, pluginID string, pluginMetricLabel string, elapsed float64) {
|
|
_m.Called(platform, agent, pluginID, pluginMetricLabel, elapsed)
|
|
}
|
|
|
|
// ObservePostsSearchDuration provides a mock function with given fields: elapsed
|
|
func (_m *MetricsInterface) ObservePostsSearchDuration(elapsed float64) {
|
|
_m.Called(elapsed)
|
|
}
|
|
|
|
// ObserveRedisEndpointDuration provides a mock function with given fields: cacheName, operation, elapsed
|
|
func (_m *MetricsInterface) ObserveRedisEndpointDuration(cacheName string, operation string, elapsed float64) {
|
|
_m.Called(cacheName, operation, elapsed)
|
|
}
|
|
|
|
// ObserveRemoteClusterClockSkew provides a mock function with given fields: remoteID, skew
|
|
func (_m *MetricsInterface) ObserveRemoteClusterClockSkew(remoteID string, skew float64) {
|
|
_m.Called(remoteID, skew)
|
|
}
|
|
|
|
// ObserveRemoteClusterPingDuration provides a mock function with given fields: remoteID, elapsed
|
|
func (_m *MetricsInterface) ObserveRemoteClusterPingDuration(remoteID string, elapsed float64) {
|
|
_m.Called(remoteID, elapsed)
|
|
}
|
|
|
|
// ObserveSharedChannelsQueueSize provides a mock function with given fields: size
|
|
func (_m *MetricsInterface) ObserveSharedChannelsQueueSize(size int64) {
|
|
_m.Called(size)
|
|
}
|
|
|
|
// ObserveSharedChannelsSyncCollectionDuration provides a mock function with given fields: remoteID, elapsed
|
|
func (_m *MetricsInterface) ObserveSharedChannelsSyncCollectionDuration(remoteID string, elapsed float64) {
|
|
_m.Called(remoteID, elapsed)
|
|
}
|
|
|
|
// ObserveSharedChannelsSyncCollectionStepDuration provides a mock function with given fields: remoteID, step, elapsed
|
|
func (_m *MetricsInterface) ObserveSharedChannelsSyncCollectionStepDuration(remoteID string, step string, elapsed float64) {
|
|
_m.Called(remoteID, step, elapsed)
|
|
}
|
|
|
|
// ObserveSharedChannelsSyncSendDuration provides a mock function with given fields: remoteID, elapsed
|
|
func (_m *MetricsInterface) ObserveSharedChannelsSyncSendDuration(remoteID string, elapsed float64) {
|
|
_m.Called(remoteID, elapsed)
|
|
}
|
|
|
|
// ObserveSharedChannelsSyncSendStepDuration provides a mock function with given fields: remoteID, step, elapsed
|
|
func (_m *MetricsInterface) ObserveSharedChannelsSyncSendStepDuration(remoteID string, step string, elapsed float64) {
|
|
_m.Called(remoteID, step, elapsed)
|
|
}
|
|
|
|
// ObserveSharedChannelsTaskInQueueDuration provides a mock function with given fields: elapsed
|
|
func (_m *MetricsInterface) ObserveSharedChannelsTaskInQueueDuration(elapsed float64) {
|
|
_m.Called(elapsed)
|
|
}
|
|
|
|
// ObserveStoreMethodDuration provides a mock function with given fields: method, success, elapsed
|
|
func (_m *MetricsInterface) ObserveStoreMethodDuration(method string, success string, elapsed float64) {
|
|
_m.Called(method, success, elapsed)
|
|
}
|
|
|
|
// Register provides a mock function with no fields
|
|
func (_m *MetricsInterface) Register() {
|
|
_m.Called()
|
|
}
|
|
|
|
// RegisterDBCollector provides a mock function with given fields: db, name
|
|
func (_m *MetricsInterface) RegisterDBCollector(db *sql.DB, name string) {
|
|
_m.Called(db, name)
|
|
}
|
|
|
|
// SetAutoTranslateQueueDepth provides a mock function with given fields: depth
|
|
func (_m *MetricsInterface) SetAutoTranslateQueueDepth(depth float64) {
|
|
_m.Called(depth)
|
|
}
|
|
|
|
// SetReplicaLagAbsolute provides a mock function with given fields: node, value
|
|
func (_m *MetricsInterface) SetReplicaLagAbsolute(node string, value float64) {
|
|
_m.Called(node, value)
|
|
}
|
|
|
|
// SetReplicaLagTime provides a mock function with given fields: node, value
|
|
func (_m *MetricsInterface) SetReplicaLagTime(node string, value float64) {
|
|
_m.Called(node, value)
|
|
}
|
|
|
|
// UnregisterDBCollector provides a mock function with given fields: db, name
|
|
func (_m *MetricsInterface) UnregisterDBCollector(db *sql.DB, name string) {
|
|
_m.Called(db, name)
|
|
}
|
|
|
|
// NewMetricsInterface creates a new instance of MetricsInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewMetricsInterface(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MetricsInterface {
|
|
mock := &MetricsInterface{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|