github.com/mattermosttest/mattermost-server/v5@v5.0.0-20200917143240-9dfa12e121f9/store/timerlayer/timerlayer.go (about)

     1  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
     2  // See LICENSE.txt for license information.
     3  
     4  // Code generated by "make store-layers"
     5  // DO NOT EDIT
     6  
     7  package timerlayer
     8  
     9  import (
    10  	"context"
    11  	timemodule "time"
    12  
    13  	"github.com/mattermost/mattermost-server/v5/einterfaces"
    14  	"github.com/mattermost/mattermost-server/v5/model"
    15  	"github.com/mattermost/mattermost-server/v5/store"
    16  )
    17  
    18  type TimerLayer struct {
    19  	store.Store
    20  	Metrics                   einterfaces.MetricsInterface
    21  	AuditStore                store.AuditStore
    22  	BotStore                  store.BotStore
    23  	ChannelStore              store.ChannelStore
    24  	ChannelMemberHistoryStore store.ChannelMemberHistoryStore
    25  	ClusterDiscoveryStore     store.ClusterDiscoveryStore
    26  	CommandStore              store.CommandStore
    27  	CommandWebhookStore       store.CommandWebhookStore
    28  	ComplianceStore           store.ComplianceStore
    29  	EmojiStore                store.EmojiStore
    30  	FileInfoStore             store.FileInfoStore
    31  	GroupStore                store.GroupStore
    32  	JobStore                  store.JobStore
    33  	LicenseStore              store.LicenseStore
    34  	LinkMetadataStore         store.LinkMetadataStore
    35  	OAuthStore                store.OAuthStore
    36  	PluginStore               store.PluginStore
    37  	PostStore                 store.PostStore
    38  	PreferenceStore           store.PreferenceStore
    39  	ReactionStore             store.ReactionStore
    40  	RoleStore                 store.RoleStore
    41  	SchemeStore               store.SchemeStore
    42  	SessionStore              store.SessionStore
    43  	StatusStore               store.StatusStore
    44  	SystemStore               store.SystemStore
    45  	TeamStore                 store.TeamStore
    46  	TermsOfServiceStore       store.TermsOfServiceStore
    47  	TokenStore                store.TokenStore
    48  	UserStore                 store.UserStore
    49  	UserAccessTokenStore      store.UserAccessTokenStore
    50  	UserTermsOfServiceStore   store.UserTermsOfServiceStore
    51  	WebhookStore              store.WebhookStore
    52  }
    53  
    54  func (s *TimerLayer) Audit() store.AuditStore {
    55  	return s.AuditStore
    56  }
    57  
    58  func (s *TimerLayer) Bot() store.BotStore {
    59  	return s.BotStore
    60  }
    61  
    62  func (s *TimerLayer) Channel() store.ChannelStore {
    63  	return s.ChannelStore
    64  }
    65  
    66  func (s *TimerLayer) ChannelMemberHistory() store.ChannelMemberHistoryStore {
    67  	return s.ChannelMemberHistoryStore
    68  }
    69  
    70  func (s *TimerLayer) ClusterDiscovery() store.ClusterDiscoveryStore {
    71  	return s.ClusterDiscoveryStore
    72  }
    73  
    74  func (s *TimerLayer) Command() store.CommandStore {
    75  	return s.CommandStore
    76  }
    77  
    78  func (s *TimerLayer) CommandWebhook() store.CommandWebhookStore {
    79  	return s.CommandWebhookStore
    80  }
    81  
    82  func (s *TimerLayer) Compliance() store.ComplianceStore {
    83  	return s.ComplianceStore
    84  }
    85  
    86  func (s *TimerLayer) Emoji() store.EmojiStore {
    87  	return s.EmojiStore
    88  }
    89  
    90  func (s *TimerLayer) FileInfo() store.FileInfoStore {
    91  	return s.FileInfoStore
    92  }
    93  
    94  func (s *TimerLayer) Group() store.GroupStore {
    95  	return s.GroupStore
    96  }
    97  
    98  func (s *TimerLayer) Job() store.JobStore {
    99  	return s.JobStore
   100  }
   101  
   102  func (s *TimerLayer) License() store.LicenseStore {
   103  	return s.LicenseStore
   104  }
   105  
   106  func (s *TimerLayer) LinkMetadata() store.LinkMetadataStore {
   107  	return s.LinkMetadataStore
   108  }
   109  
   110  func (s *TimerLayer) OAuth() store.OAuthStore {
   111  	return s.OAuthStore
   112  }
   113  
   114  func (s *TimerLayer) Plugin() store.PluginStore {
   115  	return s.PluginStore
   116  }
   117  
   118  func (s *TimerLayer) Post() store.PostStore {
   119  	return s.PostStore
   120  }
   121  
   122  func (s *TimerLayer) Preference() store.PreferenceStore {
   123  	return s.PreferenceStore
   124  }
   125  
   126  func (s *TimerLayer) Reaction() store.ReactionStore {
   127  	return s.ReactionStore
   128  }
   129  
   130  func (s *TimerLayer) Role() store.RoleStore {
   131  	return s.RoleStore
   132  }
   133  
   134  func (s *TimerLayer) Scheme() store.SchemeStore {
   135  	return s.SchemeStore
   136  }
   137  
   138  func (s *TimerLayer) Session() store.SessionStore {
   139  	return s.SessionStore
   140  }
   141  
   142  func (s *TimerLayer) Status() store.StatusStore {
   143  	return s.StatusStore
   144  }
   145  
   146  func (s *TimerLayer) System() store.SystemStore {
   147  	return s.SystemStore
   148  }
   149  
   150  func (s *TimerLayer) Team() store.TeamStore {
   151  	return s.TeamStore
   152  }
   153  
   154  func (s *TimerLayer) TermsOfService() store.TermsOfServiceStore {
   155  	return s.TermsOfServiceStore
   156  }
   157  
   158  func (s *TimerLayer) Token() store.TokenStore {
   159  	return s.TokenStore
   160  }
   161  
   162  func (s *TimerLayer) User() store.UserStore {
   163  	return s.UserStore
   164  }
   165  
   166  func (s *TimerLayer) UserAccessToken() store.UserAccessTokenStore {
   167  	return s.UserAccessTokenStore
   168  }
   169  
   170  func (s *TimerLayer) UserTermsOfService() store.UserTermsOfServiceStore {
   171  	return s.UserTermsOfServiceStore
   172  }
   173  
   174  func (s *TimerLayer) Webhook() store.WebhookStore {
   175  	return s.WebhookStore
   176  }
   177  
   178  type TimerLayerAuditStore struct {
   179  	store.AuditStore
   180  	Root *TimerLayer
   181  }
   182  
   183  type TimerLayerBotStore struct {
   184  	store.BotStore
   185  	Root *TimerLayer
   186  }
   187  
   188  type TimerLayerChannelStore struct {
   189  	store.ChannelStore
   190  	Root *TimerLayer
   191  }
   192  
   193  type TimerLayerChannelMemberHistoryStore struct {
   194  	store.ChannelMemberHistoryStore
   195  	Root *TimerLayer
   196  }
   197  
   198  type TimerLayerClusterDiscoveryStore struct {
   199  	store.ClusterDiscoveryStore
   200  	Root *TimerLayer
   201  }
   202  
   203  type TimerLayerCommandStore struct {
   204  	store.CommandStore
   205  	Root *TimerLayer
   206  }
   207  
   208  type TimerLayerCommandWebhookStore struct {
   209  	store.CommandWebhookStore
   210  	Root *TimerLayer
   211  }
   212  
   213  type TimerLayerComplianceStore struct {
   214  	store.ComplianceStore
   215  	Root *TimerLayer
   216  }
   217  
   218  type TimerLayerEmojiStore struct {
   219  	store.EmojiStore
   220  	Root *TimerLayer
   221  }
   222  
   223  type TimerLayerFileInfoStore struct {
   224  	store.FileInfoStore
   225  	Root *TimerLayer
   226  }
   227  
   228  type TimerLayerGroupStore struct {
   229  	store.GroupStore
   230  	Root *TimerLayer
   231  }
   232  
   233  type TimerLayerJobStore struct {
   234  	store.JobStore
   235  	Root *TimerLayer
   236  }
   237  
   238  type TimerLayerLicenseStore struct {
   239  	store.LicenseStore
   240  	Root *TimerLayer
   241  }
   242  
   243  type TimerLayerLinkMetadataStore struct {
   244  	store.LinkMetadataStore
   245  	Root *TimerLayer
   246  }
   247  
   248  type TimerLayerOAuthStore struct {
   249  	store.OAuthStore
   250  	Root *TimerLayer
   251  }
   252  
   253  type TimerLayerPluginStore struct {
   254  	store.PluginStore
   255  	Root *TimerLayer
   256  }
   257  
   258  type TimerLayerPostStore struct {
   259  	store.PostStore
   260  	Root *TimerLayer
   261  }
   262  
   263  type TimerLayerPreferenceStore struct {
   264  	store.PreferenceStore
   265  	Root *TimerLayer
   266  }
   267  
   268  type TimerLayerReactionStore struct {
   269  	store.ReactionStore
   270  	Root *TimerLayer
   271  }
   272  
   273  type TimerLayerRoleStore struct {
   274  	store.RoleStore
   275  	Root *TimerLayer
   276  }
   277  
   278  type TimerLayerSchemeStore struct {
   279  	store.SchemeStore
   280  	Root *TimerLayer
   281  }
   282  
   283  type TimerLayerSessionStore struct {
   284  	store.SessionStore
   285  	Root *TimerLayer
   286  }
   287  
   288  type TimerLayerStatusStore struct {
   289  	store.StatusStore
   290  	Root *TimerLayer
   291  }
   292  
   293  type TimerLayerSystemStore struct {
   294  	store.SystemStore
   295  	Root *TimerLayer
   296  }
   297  
   298  type TimerLayerTeamStore struct {
   299  	store.TeamStore
   300  	Root *TimerLayer
   301  }
   302  
   303  type TimerLayerTermsOfServiceStore struct {
   304  	store.TermsOfServiceStore
   305  	Root *TimerLayer
   306  }
   307  
   308  type TimerLayerTokenStore struct {
   309  	store.TokenStore
   310  	Root *TimerLayer
   311  }
   312  
   313  type TimerLayerUserStore struct {
   314  	store.UserStore
   315  	Root *TimerLayer
   316  }
   317  
   318  type TimerLayerUserAccessTokenStore struct {
   319  	store.UserAccessTokenStore
   320  	Root *TimerLayer
   321  }
   322  
   323  type TimerLayerUserTermsOfServiceStore struct {
   324  	store.UserTermsOfServiceStore
   325  	Root *TimerLayer
   326  }
   327  
   328  type TimerLayerWebhookStore struct {
   329  	store.WebhookStore
   330  	Root *TimerLayer
   331  }
   332  
   333  func (s *TimerLayerAuditStore) Get(user_id string, offset int, limit int) (model.Audits, error) {
   334  	start := timemodule.Now()
   335  
   336  	resultVar0, resultVar1 := s.AuditStore.Get(user_id, offset, limit)
   337  
   338  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   339  	if s.Root.Metrics != nil {
   340  		success := "false"
   341  		if resultVar1 == nil {
   342  			success = "true"
   343  		}
   344  		s.Root.Metrics.ObserveStoreMethodDuration("AuditStore.Get", success, elapsed)
   345  	}
   346  	return resultVar0, resultVar1
   347  }
   348  
   349  func (s *TimerLayerAuditStore) PermanentDeleteByUser(userId string) error {
   350  	start := timemodule.Now()
   351  
   352  	resultVar0 := s.AuditStore.PermanentDeleteByUser(userId)
   353  
   354  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   355  	if s.Root.Metrics != nil {
   356  		success := "false"
   357  		if resultVar0 == nil {
   358  			success = "true"
   359  		}
   360  		s.Root.Metrics.ObserveStoreMethodDuration("AuditStore.PermanentDeleteByUser", success, elapsed)
   361  	}
   362  	return resultVar0
   363  }
   364  
   365  func (s *TimerLayerAuditStore) Save(audit *model.Audit) error {
   366  	start := timemodule.Now()
   367  
   368  	resultVar0 := s.AuditStore.Save(audit)
   369  
   370  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   371  	if s.Root.Metrics != nil {
   372  		success := "false"
   373  		if resultVar0 == nil {
   374  			success = "true"
   375  		}
   376  		s.Root.Metrics.ObserveStoreMethodDuration("AuditStore.Save", success, elapsed)
   377  	}
   378  	return resultVar0
   379  }
   380  
   381  func (s *TimerLayerBotStore) Get(userId string, includeDeleted bool) (*model.Bot, error) {
   382  	start := timemodule.Now()
   383  
   384  	resultVar0, resultVar1 := s.BotStore.Get(userId, includeDeleted)
   385  
   386  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   387  	if s.Root.Metrics != nil {
   388  		success := "false"
   389  		if resultVar1 == nil {
   390  			success = "true"
   391  		}
   392  		s.Root.Metrics.ObserveStoreMethodDuration("BotStore.Get", success, elapsed)
   393  	}
   394  	return resultVar0, resultVar1
   395  }
   396  
   397  func (s *TimerLayerBotStore) GetAll(options *model.BotGetOptions) ([]*model.Bot, error) {
   398  	start := timemodule.Now()
   399  
   400  	resultVar0, resultVar1 := s.BotStore.GetAll(options)
   401  
   402  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   403  	if s.Root.Metrics != nil {
   404  		success := "false"
   405  		if resultVar1 == nil {
   406  			success = "true"
   407  		}
   408  		s.Root.Metrics.ObserveStoreMethodDuration("BotStore.GetAll", success, elapsed)
   409  	}
   410  	return resultVar0, resultVar1
   411  }
   412  
   413  func (s *TimerLayerBotStore) PermanentDelete(userId string) error {
   414  	start := timemodule.Now()
   415  
   416  	resultVar0 := s.BotStore.PermanentDelete(userId)
   417  
   418  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   419  	if s.Root.Metrics != nil {
   420  		success := "false"
   421  		if resultVar0 == nil {
   422  			success = "true"
   423  		}
   424  		s.Root.Metrics.ObserveStoreMethodDuration("BotStore.PermanentDelete", success, elapsed)
   425  	}
   426  	return resultVar0
   427  }
   428  
   429  func (s *TimerLayerBotStore) Save(bot *model.Bot) (*model.Bot, error) {
   430  	start := timemodule.Now()
   431  
   432  	resultVar0, resultVar1 := s.BotStore.Save(bot)
   433  
   434  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   435  	if s.Root.Metrics != nil {
   436  		success := "false"
   437  		if resultVar1 == nil {
   438  			success = "true"
   439  		}
   440  		s.Root.Metrics.ObserveStoreMethodDuration("BotStore.Save", success, elapsed)
   441  	}
   442  	return resultVar0, resultVar1
   443  }
   444  
   445  func (s *TimerLayerBotStore) Update(bot *model.Bot) (*model.Bot, error) {
   446  	start := timemodule.Now()
   447  
   448  	resultVar0, resultVar1 := s.BotStore.Update(bot)
   449  
   450  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   451  	if s.Root.Metrics != nil {
   452  		success := "false"
   453  		if resultVar1 == nil {
   454  			success = "true"
   455  		}
   456  		s.Root.Metrics.ObserveStoreMethodDuration("BotStore.Update", success, elapsed)
   457  	}
   458  	return resultVar0, resultVar1
   459  }
   460  
   461  func (s *TimerLayerChannelStore) AnalyticsDeletedTypeCount(teamId string, channelType string) (int64, *model.AppError) {
   462  	start := timemodule.Now()
   463  
   464  	resultVar0, resultVar1 := s.ChannelStore.AnalyticsDeletedTypeCount(teamId, channelType)
   465  
   466  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   467  	if s.Root.Metrics != nil {
   468  		success := "false"
   469  		if resultVar1 == nil {
   470  			success = "true"
   471  		}
   472  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.AnalyticsDeletedTypeCount", success, elapsed)
   473  	}
   474  	return resultVar0, resultVar1
   475  }
   476  
   477  func (s *TimerLayerChannelStore) AnalyticsTypeCount(teamId string, channelType string) (int64, *model.AppError) {
   478  	start := timemodule.Now()
   479  
   480  	resultVar0, resultVar1 := s.ChannelStore.AnalyticsTypeCount(teamId, channelType)
   481  
   482  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   483  	if s.Root.Metrics != nil {
   484  		success := "false"
   485  		if resultVar1 == nil {
   486  			success = "true"
   487  		}
   488  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.AnalyticsTypeCount", success, elapsed)
   489  	}
   490  	return resultVar0, resultVar1
   491  }
   492  
   493  func (s *TimerLayerChannelStore) AutocompleteInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
   494  	start := timemodule.Now()
   495  
   496  	resultVar0, resultVar1 := s.ChannelStore.AutocompleteInTeam(teamId, term, includeDeleted)
   497  
   498  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   499  	if s.Root.Metrics != nil {
   500  		success := "false"
   501  		if resultVar1 == nil {
   502  			success = "true"
   503  		}
   504  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.AutocompleteInTeam", success, elapsed)
   505  	}
   506  	return resultVar0, resultVar1
   507  }
   508  
   509  func (s *TimerLayerChannelStore) AutocompleteInTeamForSearch(teamId string, userId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
   510  	start := timemodule.Now()
   511  
   512  	resultVar0, resultVar1 := s.ChannelStore.AutocompleteInTeamForSearch(teamId, userId, term, includeDeleted)
   513  
   514  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   515  	if s.Root.Metrics != nil {
   516  		success := "false"
   517  		if resultVar1 == nil {
   518  			success = "true"
   519  		}
   520  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.AutocompleteInTeamForSearch", success, elapsed)
   521  	}
   522  	return resultVar0, resultVar1
   523  }
   524  
   525  func (s *TimerLayerChannelStore) ClearAllCustomRoleAssignments() *model.AppError {
   526  	start := timemodule.Now()
   527  
   528  	resultVar0 := s.ChannelStore.ClearAllCustomRoleAssignments()
   529  
   530  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   531  	if s.Root.Metrics != nil {
   532  		success := "false"
   533  		if resultVar0 == nil {
   534  			success = "true"
   535  		}
   536  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.ClearAllCustomRoleAssignments", success, elapsed)
   537  	}
   538  	return resultVar0
   539  }
   540  
   541  func (s *TimerLayerChannelStore) ClearCaches() {
   542  	start := timemodule.Now()
   543  
   544  	s.ChannelStore.ClearCaches()
   545  
   546  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   547  	if s.Root.Metrics != nil {
   548  		success := "false"
   549  		if true {
   550  			success = "true"
   551  		}
   552  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.ClearCaches", success, elapsed)
   553  	}
   554  }
   555  
   556  func (s *TimerLayerChannelStore) ClearSidebarOnTeamLeave(userId string, teamId string) *model.AppError {
   557  	start := timemodule.Now()
   558  
   559  	resultVar0 := s.ChannelStore.ClearSidebarOnTeamLeave(userId, teamId)
   560  
   561  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   562  	if s.Root.Metrics != nil {
   563  		success := "false"
   564  		if resultVar0 == nil {
   565  			success = "true"
   566  		}
   567  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.ClearSidebarOnTeamLeave", success, elapsed)
   568  	}
   569  	return resultVar0
   570  }
   571  
   572  func (s *TimerLayerChannelStore) CountPostsAfter(channelId string, timestamp int64, userId string) (int, *model.AppError) {
   573  	start := timemodule.Now()
   574  
   575  	resultVar0, resultVar1 := s.ChannelStore.CountPostsAfter(channelId, timestamp, userId)
   576  
   577  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   578  	if s.Root.Metrics != nil {
   579  		success := "false"
   580  		if resultVar1 == nil {
   581  			success = "true"
   582  		}
   583  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.CountPostsAfter", success, elapsed)
   584  	}
   585  	return resultVar0, resultVar1
   586  }
   587  
   588  func (s *TimerLayerChannelStore) CreateDirectChannel(userId *model.User, otherUserId *model.User) (*model.Channel, error) {
   589  	start := timemodule.Now()
   590  
   591  	resultVar0, resultVar1 := s.ChannelStore.CreateDirectChannel(userId, otherUserId)
   592  
   593  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   594  	if s.Root.Metrics != nil {
   595  		success := "false"
   596  		if resultVar1 == nil {
   597  			success = "true"
   598  		}
   599  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.CreateDirectChannel", success, elapsed)
   600  	}
   601  	return resultVar0, resultVar1
   602  }
   603  
   604  func (s *TimerLayerChannelStore) CreateInitialSidebarCategories(userId string, teamId string) error {
   605  	start := timemodule.Now()
   606  
   607  	resultVar0 := s.ChannelStore.CreateInitialSidebarCategories(userId, teamId)
   608  
   609  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   610  	if s.Root.Metrics != nil {
   611  		success := "false"
   612  		if resultVar0 == nil {
   613  			success = "true"
   614  		}
   615  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.CreateInitialSidebarCategories", success, elapsed)
   616  	}
   617  	return resultVar0
   618  }
   619  
   620  func (s *TimerLayerChannelStore) CreateSidebarCategory(userId string, teamId string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError) {
   621  	start := timemodule.Now()
   622  
   623  	resultVar0, resultVar1 := s.ChannelStore.CreateSidebarCategory(userId, teamId, newCategory)
   624  
   625  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   626  	if s.Root.Metrics != nil {
   627  		success := "false"
   628  		if resultVar1 == nil {
   629  			success = "true"
   630  		}
   631  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.CreateSidebarCategory", success, elapsed)
   632  	}
   633  	return resultVar0, resultVar1
   634  }
   635  
   636  func (s *TimerLayerChannelStore) Delete(channelId string, time int64) error {
   637  	start := timemodule.Now()
   638  
   639  	resultVar0 := s.ChannelStore.Delete(channelId, time)
   640  
   641  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   642  	if s.Root.Metrics != nil {
   643  		success := "false"
   644  		if resultVar0 == nil {
   645  			success = "true"
   646  		}
   647  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.Delete", success, elapsed)
   648  	}
   649  	return resultVar0
   650  }
   651  
   652  func (s *TimerLayerChannelStore) DeleteSidebarCategory(categoryId string) *model.AppError {
   653  	start := timemodule.Now()
   654  
   655  	resultVar0 := s.ChannelStore.DeleteSidebarCategory(categoryId)
   656  
   657  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   658  	if s.Root.Metrics != nil {
   659  		success := "false"
   660  		if resultVar0 == nil {
   661  			success = "true"
   662  		}
   663  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.DeleteSidebarCategory", success, elapsed)
   664  	}
   665  	return resultVar0
   666  }
   667  
   668  func (s *TimerLayerChannelStore) DeleteSidebarChannelsByPreferences(preferences *model.Preferences) error {
   669  	start := timemodule.Now()
   670  
   671  	resultVar0 := s.ChannelStore.DeleteSidebarChannelsByPreferences(preferences)
   672  
   673  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   674  	if s.Root.Metrics != nil {
   675  		success := "false"
   676  		if resultVar0 == nil {
   677  			success = "true"
   678  		}
   679  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.DeleteSidebarChannelsByPreferences", success, elapsed)
   680  	}
   681  	return resultVar0
   682  }
   683  
   684  func (s *TimerLayerChannelStore) Get(id string, allowFromCache bool) (*model.Channel, error) {
   685  	start := timemodule.Now()
   686  
   687  	resultVar0, resultVar1 := s.ChannelStore.Get(id, allowFromCache)
   688  
   689  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   690  	if s.Root.Metrics != nil {
   691  		success := "false"
   692  		if resultVar1 == nil {
   693  			success = "true"
   694  		}
   695  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.Get", success, elapsed)
   696  	}
   697  	return resultVar0, resultVar1
   698  }
   699  
   700  func (s *TimerLayerChannelStore) GetAll(teamId string) ([]*model.Channel, *model.AppError) {
   701  	start := timemodule.Now()
   702  
   703  	resultVar0, resultVar1 := s.ChannelStore.GetAll(teamId)
   704  
   705  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   706  	if s.Root.Metrics != nil {
   707  		success := "false"
   708  		if resultVar1 == nil {
   709  			success = "true"
   710  		}
   711  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetAll", success, elapsed)
   712  	}
   713  	return resultVar0, resultVar1
   714  }
   715  
   716  func (s *TimerLayerChannelStore) GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, *model.AppError) {
   717  	start := timemodule.Now()
   718  
   719  	resultVar0, resultVar1 := s.ChannelStore.GetAllChannelMembersForUser(userId, allowFromCache, includeDeleted)
   720  
   721  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   722  	if s.Root.Metrics != nil {
   723  		success := "false"
   724  		if resultVar1 == nil {
   725  			success = "true"
   726  		}
   727  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetAllChannelMembersForUser", success, elapsed)
   728  	}
   729  	return resultVar0, resultVar1
   730  }
   731  
   732  func (s *TimerLayerChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelId string, allowFromCache bool) (map[string]model.StringMap, *model.AppError) {
   733  	start := timemodule.Now()
   734  
   735  	resultVar0, resultVar1 := s.ChannelStore.GetAllChannelMembersNotifyPropsForChannel(channelId, allowFromCache)
   736  
   737  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   738  	if s.Root.Metrics != nil {
   739  		success := "false"
   740  		if resultVar1 == nil {
   741  			success = "true"
   742  		}
   743  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetAllChannelMembersNotifyPropsForChannel", success, elapsed)
   744  	}
   745  	return resultVar0, resultVar1
   746  }
   747  
   748  func (s *TimerLayerChannelStore) GetAllChannels(page int, perPage int, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, error) {
   749  	start := timemodule.Now()
   750  
   751  	resultVar0, resultVar1 := s.ChannelStore.GetAllChannels(page, perPage, opts)
   752  
   753  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   754  	if s.Root.Metrics != nil {
   755  		success := "false"
   756  		if resultVar1 == nil {
   757  			success = "true"
   758  		}
   759  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetAllChannels", success, elapsed)
   760  	}
   761  	return resultVar0, resultVar1
   762  }
   763  
   764  func (s *TimerLayerChannelStore) GetAllChannelsCount(opts store.ChannelSearchOpts) (int64, error) {
   765  	start := timemodule.Now()
   766  
   767  	resultVar0, resultVar1 := s.ChannelStore.GetAllChannelsCount(opts)
   768  
   769  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   770  	if s.Root.Metrics != nil {
   771  		success := "false"
   772  		if resultVar1 == nil {
   773  			success = "true"
   774  		}
   775  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetAllChannelsCount", success, elapsed)
   776  	}
   777  	return resultVar0, resultVar1
   778  }
   779  
   780  func (s *TimerLayerChannelStore) GetAllChannelsForExportAfter(limit int, afterId string) ([]*model.ChannelForExport, *model.AppError) {
   781  	start := timemodule.Now()
   782  
   783  	resultVar0, resultVar1 := s.ChannelStore.GetAllChannelsForExportAfter(limit, afterId)
   784  
   785  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   786  	if s.Root.Metrics != nil {
   787  		success := "false"
   788  		if resultVar1 == nil {
   789  			success = "true"
   790  		}
   791  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetAllChannelsForExportAfter", success, elapsed)
   792  	}
   793  	return resultVar0, resultVar1
   794  }
   795  
   796  func (s *TimerLayerChannelStore) GetAllDirectChannelsForExportAfter(limit int, afterId string) ([]*model.DirectChannelForExport, *model.AppError) {
   797  	start := timemodule.Now()
   798  
   799  	resultVar0, resultVar1 := s.ChannelStore.GetAllDirectChannelsForExportAfter(limit, afterId)
   800  
   801  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   802  	if s.Root.Metrics != nil {
   803  		success := "false"
   804  		if resultVar1 == nil {
   805  			success = "true"
   806  		}
   807  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetAllDirectChannelsForExportAfter", success, elapsed)
   808  	}
   809  	return resultVar0, resultVar1
   810  }
   811  
   812  func (s *TimerLayerChannelStore) GetByName(team_id string, name string, allowFromCache bool) (*model.Channel, error) {
   813  	start := timemodule.Now()
   814  
   815  	resultVar0, resultVar1 := s.ChannelStore.GetByName(team_id, name, allowFromCache)
   816  
   817  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   818  	if s.Root.Metrics != nil {
   819  		success := "false"
   820  		if resultVar1 == nil {
   821  			success = "true"
   822  		}
   823  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetByName", success, elapsed)
   824  	}
   825  	return resultVar0, resultVar1
   826  }
   827  
   828  func (s *TimerLayerChannelStore) GetByNameIncludeDeleted(team_id string, name string, allowFromCache bool) (*model.Channel, error) {
   829  	start := timemodule.Now()
   830  
   831  	resultVar0, resultVar1 := s.ChannelStore.GetByNameIncludeDeleted(team_id, name, allowFromCache)
   832  
   833  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   834  	if s.Root.Metrics != nil {
   835  		success := "false"
   836  		if resultVar1 == nil {
   837  			success = "true"
   838  		}
   839  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetByNameIncludeDeleted", success, elapsed)
   840  	}
   841  	return resultVar0, resultVar1
   842  }
   843  
   844  func (s *TimerLayerChannelStore) GetByNames(team_id string, names []string, allowFromCache bool) ([]*model.Channel, error) {
   845  	start := timemodule.Now()
   846  
   847  	resultVar0, resultVar1 := s.ChannelStore.GetByNames(team_id, names, allowFromCache)
   848  
   849  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   850  	if s.Root.Metrics != nil {
   851  		success := "false"
   852  		if resultVar1 == nil {
   853  			success = "true"
   854  		}
   855  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetByNames", success, elapsed)
   856  	}
   857  	return resultVar0, resultVar1
   858  }
   859  
   860  func (s *TimerLayerChannelStore) GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, *model.AppError) {
   861  	start := timemodule.Now()
   862  
   863  	resultVar0, resultVar1 := s.ChannelStore.GetChannelCounts(teamId, userId)
   864  
   865  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   866  	if s.Root.Metrics != nil {
   867  		success := "false"
   868  		if resultVar1 == nil {
   869  			success = "true"
   870  		}
   871  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetChannelCounts", success, elapsed)
   872  	}
   873  	return resultVar0, resultVar1
   874  }
   875  
   876  func (s *TimerLayerChannelStore) GetChannelMembersForExport(userId string, teamId string) ([]*model.ChannelMemberForExport, *model.AppError) {
   877  	start := timemodule.Now()
   878  
   879  	resultVar0, resultVar1 := s.ChannelStore.GetChannelMembersForExport(userId, teamId)
   880  
   881  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   882  	if s.Root.Metrics != nil {
   883  		success := "false"
   884  		if resultVar1 == nil {
   885  			success = "true"
   886  		}
   887  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetChannelMembersForExport", success, elapsed)
   888  	}
   889  	return resultVar0, resultVar1
   890  }
   891  
   892  func (s *TimerLayerChannelStore) GetChannelMembersTimezones(channelId string) ([]model.StringMap, *model.AppError) {
   893  	start := timemodule.Now()
   894  
   895  	resultVar0, resultVar1 := s.ChannelStore.GetChannelMembersTimezones(channelId)
   896  
   897  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   898  	if s.Root.Metrics != nil {
   899  		success := "false"
   900  		if resultVar1 == nil {
   901  			success = "true"
   902  		}
   903  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetChannelMembersTimezones", success, elapsed)
   904  	}
   905  	return resultVar0, resultVar1
   906  }
   907  
   908  func (s *TimerLayerChannelStore) GetChannelUnread(channelId string, userId string) (*model.ChannelUnread, *model.AppError) {
   909  	start := timemodule.Now()
   910  
   911  	resultVar0, resultVar1 := s.ChannelStore.GetChannelUnread(channelId, userId)
   912  
   913  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   914  	if s.Root.Metrics != nil {
   915  		success := "false"
   916  		if resultVar1 == nil {
   917  			success = "true"
   918  		}
   919  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetChannelUnread", success, elapsed)
   920  	}
   921  	return resultVar0, resultVar1
   922  }
   923  
   924  func (s *TimerLayerChannelStore) GetChannels(teamId string, userId string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error) {
   925  	start := timemodule.Now()
   926  
   927  	resultVar0, resultVar1 := s.ChannelStore.GetChannels(teamId, userId, includeDeleted, lastDeleteAt)
   928  
   929  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   930  	if s.Root.Metrics != nil {
   931  		success := "false"
   932  		if resultVar1 == nil {
   933  			success = "true"
   934  		}
   935  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetChannels", success, elapsed)
   936  	}
   937  	return resultVar0, resultVar1
   938  }
   939  
   940  func (s *TimerLayerChannelStore) GetChannelsBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.Channel, *model.AppError) {
   941  	start := timemodule.Now()
   942  
   943  	resultVar0, resultVar1 := s.ChannelStore.GetChannelsBatchForIndexing(startTime, endTime, limit)
   944  
   945  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   946  	if s.Root.Metrics != nil {
   947  		success := "false"
   948  		if resultVar1 == nil {
   949  			success = "true"
   950  		}
   951  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetChannelsBatchForIndexing", success, elapsed)
   952  	}
   953  	return resultVar0, resultVar1
   954  }
   955  
   956  func (s *TimerLayerChannelStore) GetChannelsByIds(channelIds []string, includeDeleted bool) ([]*model.Channel, *model.AppError) {
   957  	start := timemodule.Now()
   958  
   959  	resultVar0, resultVar1 := s.ChannelStore.GetChannelsByIds(channelIds, includeDeleted)
   960  
   961  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   962  	if s.Root.Metrics != nil {
   963  		success := "false"
   964  		if resultVar1 == nil {
   965  			success = "true"
   966  		}
   967  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetChannelsByIds", success, elapsed)
   968  	}
   969  	return resultVar0, resultVar1
   970  }
   971  
   972  func (s *TimerLayerChannelStore) GetChannelsByScheme(schemeId string, offset int, limit int) (model.ChannelList, *model.AppError) {
   973  	start := timemodule.Now()
   974  
   975  	resultVar0, resultVar1 := s.ChannelStore.GetChannelsByScheme(schemeId, offset, limit)
   976  
   977  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   978  	if s.Root.Metrics != nil {
   979  		success := "false"
   980  		if resultVar1 == nil {
   981  			success = "true"
   982  		}
   983  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetChannelsByScheme", success, elapsed)
   984  	}
   985  	return resultVar0, resultVar1
   986  }
   987  
   988  func (s *TimerLayerChannelStore) GetDeleted(team_id string, offset int, limit int, userId string) (*model.ChannelList, error) {
   989  	start := timemodule.Now()
   990  
   991  	resultVar0, resultVar1 := s.ChannelStore.GetDeleted(team_id, offset, limit, userId)
   992  
   993  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
   994  	if s.Root.Metrics != nil {
   995  		success := "false"
   996  		if resultVar1 == nil {
   997  			success = "true"
   998  		}
   999  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetDeleted", success, elapsed)
  1000  	}
  1001  	return resultVar0, resultVar1
  1002  }
  1003  
  1004  func (s *TimerLayerChannelStore) GetDeletedByName(team_id string, name string) (*model.Channel, error) {
  1005  	start := timemodule.Now()
  1006  
  1007  	resultVar0, resultVar1 := s.ChannelStore.GetDeletedByName(team_id, name)
  1008  
  1009  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1010  	if s.Root.Metrics != nil {
  1011  		success := "false"
  1012  		if resultVar1 == nil {
  1013  			success = "true"
  1014  		}
  1015  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetDeletedByName", success, elapsed)
  1016  	}
  1017  	return resultVar0, resultVar1
  1018  }
  1019  
  1020  func (s *TimerLayerChannelStore) GetForPost(postId string) (*model.Channel, *model.AppError) {
  1021  	start := timemodule.Now()
  1022  
  1023  	resultVar0, resultVar1 := s.ChannelStore.GetForPost(postId)
  1024  
  1025  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1026  	if s.Root.Metrics != nil {
  1027  		success := "false"
  1028  		if resultVar1 == nil {
  1029  			success = "true"
  1030  		}
  1031  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetForPost", success, elapsed)
  1032  	}
  1033  	return resultVar0, resultVar1
  1034  }
  1035  
  1036  func (s *TimerLayerChannelStore) GetFromMaster(id string) (*model.Channel, error) {
  1037  	start := timemodule.Now()
  1038  
  1039  	resultVar0, resultVar1 := s.ChannelStore.GetFromMaster(id)
  1040  
  1041  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1042  	if s.Root.Metrics != nil {
  1043  		success := "false"
  1044  		if resultVar1 == nil {
  1045  			success = "true"
  1046  		}
  1047  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetFromMaster", success, elapsed)
  1048  	}
  1049  	return resultVar0, resultVar1
  1050  }
  1051  
  1052  func (s *TimerLayerChannelStore) GetGuestCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
  1053  	start := timemodule.Now()
  1054  
  1055  	resultVar0, resultVar1 := s.ChannelStore.GetGuestCount(channelId, allowFromCache)
  1056  
  1057  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1058  	if s.Root.Metrics != nil {
  1059  		success := "false"
  1060  		if resultVar1 == nil {
  1061  			success = "true"
  1062  		}
  1063  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetGuestCount", success, elapsed)
  1064  	}
  1065  	return resultVar0, resultVar1
  1066  }
  1067  
  1068  func (s *TimerLayerChannelStore) GetMember(channelId string, userId string) (*model.ChannelMember, *model.AppError) {
  1069  	start := timemodule.Now()
  1070  
  1071  	resultVar0, resultVar1 := s.ChannelStore.GetMember(channelId, userId)
  1072  
  1073  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1074  	if s.Root.Metrics != nil {
  1075  		success := "false"
  1076  		if resultVar1 == nil {
  1077  			success = "true"
  1078  		}
  1079  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetMember", success, elapsed)
  1080  	}
  1081  	return resultVar0, resultVar1
  1082  }
  1083  
  1084  func (s *TimerLayerChannelStore) GetMemberCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
  1085  	start := timemodule.Now()
  1086  
  1087  	resultVar0, resultVar1 := s.ChannelStore.GetMemberCount(channelId, allowFromCache)
  1088  
  1089  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1090  	if s.Root.Metrics != nil {
  1091  		success := "false"
  1092  		if resultVar1 == nil {
  1093  			success = "true"
  1094  		}
  1095  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetMemberCount", success, elapsed)
  1096  	}
  1097  	return resultVar0, resultVar1
  1098  }
  1099  
  1100  func (s *TimerLayerChannelStore) GetMemberCountFromCache(channelId string) int64 {
  1101  	start := timemodule.Now()
  1102  
  1103  	resultVar0 := s.ChannelStore.GetMemberCountFromCache(channelId)
  1104  
  1105  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1106  	if s.Root.Metrics != nil {
  1107  		success := "false"
  1108  		if true {
  1109  			success = "true"
  1110  		}
  1111  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetMemberCountFromCache", success, elapsed)
  1112  	}
  1113  	return resultVar0
  1114  }
  1115  
  1116  func (s *TimerLayerChannelStore) GetMemberCountsByGroup(channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, *model.AppError) {
  1117  	start := timemodule.Now()
  1118  
  1119  	resultVar0, resultVar1 := s.ChannelStore.GetMemberCountsByGroup(channelID, includeTimezones)
  1120  
  1121  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1122  	if s.Root.Metrics != nil {
  1123  		success := "false"
  1124  		if resultVar1 == nil {
  1125  			success = "true"
  1126  		}
  1127  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetMemberCountsByGroup", success, elapsed)
  1128  	}
  1129  	return resultVar0, resultVar1
  1130  }
  1131  
  1132  func (s *TimerLayerChannelStore) GetMemberForPost(postId string, userId string) (*model.ChannelMember, *model.AppError) {
  1133  	start := timemodule.Now()
  1134  
  1135  	resultVar0, resultVar1 := s.ChannelStore.GetMemberForPost(postId, userId)
  1136  
  1137  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1138  	if s.Root.Metrics != nil {
  1139  		success := "false"
  1140  		if resultVar1 == nil {
  1141  			success = "true"
  1142  		}
  1143  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetMemberForPost", success, elapsed)
  1144  	}
  1145  	return resultVar0, resultVar1
  1146  }
  1147  
  1148  func (s *TimerLayerChannelStore) GetMembers(channelId string, offset int, limit int) (*model.ChannelMembers, *model.AppError) {
  1149  	start := timemodule.Now()
  1150  
  1151  	resultVar0, resultVar1 := s.ChannelStore.GetMembers(channelId, offset, limit)
  1152  
  1153  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1154  	if s.Root.Metrics != nil {
  1155  		success := "false"
  1156  		if resultVar1 == nil {
  1157  			success = "true"
  1158  		}
  1159  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetMembers", success, elapsed)
  1160  	}
  1161  	return resultVar0, resultVar1
  1162  }
  1163  
  1164  func (s *TimerLayerChannelStore) GetMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, *model.AppError) {
  1165  	start := timemodule.Now()
  1166  
  1167  	resultVar0, resultVar1 := s.ChannelStore.GetMembersByIds(channelId, userIds)
  1168  
  1169  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1170  	if s.Root.Metrics != nil {
  1171  		success := "false"
  1172  		if resultVar1 == nil {
  1173  			success = "true"
  1174  		}
  1175  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetMembersByIds", success, elapsed)
  1176  	}
  1177  	return resultVar0, resultVar1
  1178  }
  1179  
  1180  func (s *TimerLayerChannelStore) GetMembersForUser(teamId string, userId string) (*model.ChannelMembers, *model.AppError) {
  1181  	start := timemodule.Now()
  1182  
  1183  	resultVar0, resultVar1 := s.ChannelStore.GetMembersForUser(teamId, userId)
  1184  
  1185  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1186  	if s.Root.Metrics != nil {
  1187  		success := "false"
  1188  		if resultVar1 == nil {
  1189  			success = "true"
  1190  		}
  1191  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetMembersForUser", success, elapsed)
  1192  	}
  1193  	return resultVar0, resultVar1
  1194  }
  1195  
  1196  func (s *TimerLayerChannelStore) GetMembersForUserWithPagination(teamId string, userId string, page int, perPage int) (*model.ChannelMembers, *model.AppError) {
  1197  	start := timemodule.Now()
  1198  
  1199  	resultVar0, resultVar1 := s.ChannelStore.GetMembersForUserWithPagination(teamId, userId, page, perPage)
  1200  
  1201  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1202  	if s.Root.Metrics != nil {
  1203  		success := "false"
  1204  		if resultVar1 == nil {
  1205  			success = "true"
  1206  		}
  1207  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetMembersForUserWithPagination", success, elapsed)
  1208  	}
  1209  	return resultVar0, resultVar1
  1210  }
  1211  
  1212  func (s *TimerLayerChannelStore) GetMoreChannels(teamId string, userId string, offset int, limit int) (*model.ChannelList, error) {
  1213  	start := timemodule.Now()
  1214  
  1215  	resultVar0, resultVar1 := s.ChannelStore.GetMoreChannels(teamId, userId, offset, limit)
  1216  
  1217  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1218  	if s.Root.Metrics != nil {
  1219  		success := "false"
  1220  		if resultVar1 == nil {
  1221  			success = "true"
  1222  		}
  1223  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetMoreChannels", success, elapsed)
  1224  	}
  1225  	return resultVar0, resultVar1
  1226  }
  1227  
  1228  func (s *TimerLayerChannelStore) GetPinnedPostCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
  1229  	start := timemodule.Now()
  1230  
  1231  	resultVar0, resultVar1 := s.ChannelStore.GetPinnedPostCount(channelId, allowFromCache)
  1232  
  1233  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1234  	if s.Root.Metrics != nil {
  1235  		success := "false"
  1236  		if resultVar1 == nil {
  1237  			success = "true"
  1238  		}
  1239  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetPinnedPostCount", success, elapsed)
  1240  	}
  1241  	return resultVar0, resultVar1
  1242  }
  1243  
  1244  func (s *TimerLayerChannelStore) GetPinnedPosts(channelId string) (*model.PostList, *model.AppError) {
  1245  	start := timemodule.Now()
  1246  
  1247  	resultVar0, resultVar1 := s.ChannelStore.GetPinnedPosts(channelId)
  1248  
  1249  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1250  	if s.Root.Metrics != nil {
  1251  		success := "false"
  1252  		if resultVar1 == nil {
  1253  			success = "true"
  1254  		}
  1255  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetPinnedPosts", success, elapsed)
  1256  	}
  1257  	return resultVar0, resultVar1
  1258  }
  1259  
  1260  func (s *TimerLayerChannelStore) GetPrivateChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) {
  1261  	start := timemodule.Now()
  1262  
  1263  	resultVar0, resultVar1 := s.ChannelStore.GetPrivateChannelsForTeam(teamId, offset, limit)
  1264  
  1265  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1266  	if s.Root.Metrics != nil {
  1267  		success := "false"
  1268  		if resultVar1 == nil {
  1269  			success = "true"
  1270  		}
  1271  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetPrivateChannelsForTeam", success, elapsed)
  1272  	}
  1273  	return resultVar0, resultVar1
  1274  }
  1275  
  1276  func (s *TimerLayerChannelStore) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, *model.AppError) {
  1277  	start := timemodule.Now()
  1278  
  1279  	resultVar0, resultVar1 := s.ChannelStore.GetPublicChannelsByIdsForTeam(teamId, channelIds)
  1280  
  1281  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1282  	if s.Root.Metrics != nil {
  1283  		success := "false"
  1284  		if resultVar1 == nil {
  1285  			success = "true"
  1286  		}
  1287  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetPublicChannelsByIdsForTeam", success, elapsed)
  1288  	}
  1289  	return resultVar0, resultVar1
  1290  }
  1291  
  1292  func (s *TimerLayerChannelStore) GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) {
  1293  	start := timemodule.Now()
  1294  
  1295  	resultVar0, resultVar1 := s.ChannelStore.GetPublicChannelsForTeam(teamId, offset, limit)
  1296  
  1297  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1298  	if s.Root.Metrics != nil {
  1299  		success := "false"
  1300  		if resultVar1 == nil {
  1301  			success = "true"
  1302  		}
  1303  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetPublicChannelsForTeam", success, elapsed)
  1304  	}
  1305  	return resultVar0, resultVar1
  1306  }
  1307  
  1308  func (s *TimerLayerChannelStore) GetSidebarCategories(userId string, teamId string) (*model.OrderedSidebarCategories, *model.AppError) {
  1309  	start := timemodule.Now()
  1310  
  1311  	resultVar0, resultVar1 := s.ChannelStore.GetSidebarCategories(userId, teamId)
  1312  
  1313  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1314  	if s.Root.Metrics != nil {
  1315  		success := "false"
  1316  		if resultVar1 == nil {
  1317  			success = "true"
  1318  		}
  1319  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetSidebarCategories", success, elapsed)
  1320  	}
  1321  	return resultVar0, resultVar1
  1322  }
  1323  
  1324  func (s *TimerLayerChannelStore) GetSidebarCategory(categoryId string) (*model.SidebarCategoryWithChannels, *model.AppError) {
  1325  	start := timemodule.Now()
  1326  
  1327  	resultVar0, resultVar1 := s.ChannelStore.GetSidebarCategory(categoryId)
  1328  
  1329  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1330  	if s.Root.Metrics != nil {
  1331  		success := "false"
  1332  		if resultVar1 == nil {
  1333  			success = "true"
  1334  		}
  1335  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetSidebarCategory", success, elapsed)
  1336  	}
  1337  	return resultVar0, resultVar1
  1338  }
  1339  
  1340  func (s *TimerLayerChannelStore) GetSidebarCategoryOrder(userId string, teamId string) ([]string, *model.AppError) {
  1341  	start := timemodule.Now()
  1342  
  1343  	resultVar0, resultVar1 := s.ChannelStore.GetSidebarCategoryOrder(userId, teamId)
  1344  
  1345  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1346  	if s.Root.Metrics != nil {
  1347  		success := "false"
  1348  		if resultVar1 == nil {
  1349  			success = "true"
  1350  		}
  1351  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetSidebarCategoryOrder", success, elapsed)
  1352  	}
  1353  	return resultVar0, resultVar1
  1354  }
  1355  
  1356  func (s *TimerLayerChannelStore) GetTeamChannels(teamId string) (*model.ChannelList, *model.AppError) {
  1357  	start := timemodule.Now()
  1358  
  1359  	resultVar0, resultVar1 := s.ChannelStore.GetTeamChannels(teamId)
  1360  
  1361  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1362  	if s.Root.Metrics != nil {
  1363  		success := "false"
  1364  		if resultVar1 == nil {
  1365  			success = "true"
  1366  		}
  1367  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GetTeamChannels", success, elapsed)
  1368  	}
  1369  	return resultVar0, resultVar1
  1370  }
  1371  
  1372  func (s *TimerLayerChannelStore) GroupSyncedChannelCount() (int64, *model.AppError) {
  1373  	start := timemodule.Now()
  1374  
  1375  	resultVar0, resultVar1 := s.ChannelStore.GroupSyncedChannelCount()
  1376  
  1377  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1378  	if s.Root.Metrics != nil {
  1379  		success := "false"
  1380  		if resultVar1 == nil {
  1381  			success = "true"
  1382  		}
  1383  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.GroupSyncedChannelCount", success, elapsed)
  1384  	}
  1385  	return resultVar0, resultVar1
  1386  }
  1387  
  1388  func (s *TimerLayerChannelStore) IncrementMentionCount(channelId string, userId string) *model.AppError {
  1389  	start := timemodule.Now()
  1390  
  1391  	resultVar0 := s.ChannelStore.IncrementMentionCount(channelId, userId)
  1392  
  1393  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1394  	if s.Root.Metrics != nil {
  1395  		success := "false"
  1396  		if resultVar0 == nil {
  1397  			success = "true"
  1398  		}
  1399  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.IncrementMentionCount", success, elapsed)
  1400  	}
  1401  	return resultVar0
  1402  }
  1403  
  1404  func (s *TimerLayerChannelStore) InvalidateAllChannelMembersForUser(userId string) {
  1405  	start := timemodule.Now()
  1406  
  1407  	s.ChannelStore.InvalidateAllChannelMembersForUser(userId)
  1408  
  1409  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1410  	if s.Root.Metrics != nil {
  1411  		success := "false"
  1412  		if true {
  1413  			success = "true"
  1414  		}
  1415  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateAllChannelMembersForUser", success, elapsed)
  1416  	}
  1417  }
  1418  
  1419  func (s *TimerLayerChannelStore) InvalidateCacheForChannelMembersNotifyProps(channelId string) {
  1420  	start := timemodule.Now()
  1421  
  1422  	s.ChannelStore.InvalidateCacheForChannelMembersNotifyProps(channelId)
  1423  
  1424  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1425  	if s.Root.Metrics != nil {
  1426  		success := "false"
  1427  		if true {
  1428  			success = "true"
  1429  		}
  1430  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateCacheForChannelMembersNotifyProps", success, elapsed)
  1431  	}
  1432  }
  1433  
  1434  func (s *TimerLayerChannelStore) InvalidateChannel(id string) {
  1435  	start := timemodule.Now()
  1436  
  1437  	s.ChannelStore.InvalidateChannel(id)
  1438  
  1439  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1440  	if s.Root.Metrics != nil {
  1441  		success := "false"
  1442  		if true {
  1443  			success = "true"
  1444  		}
  1445  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateChannel", success, elapsed)
  1446  	}
  1447  }
  1448  
  1449  func (s *TimerLayerChannelStore) InvalidateChannelByName(teamId string, name string) {
  1450  	start := timemodule.Now()
  1451  
  1452  	s.ChannelStore.InvalidateChannelByName(teamId, name)
  1453  
  1454  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1455  	if s.Root.Metrics != nil {
  1456  		success := "false"
  1457  		if true {
  1458  			success = "true"
  1459  		}
  1460  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateChannelByName", success, elapsed)
  1461  	}
  1462  }
  1463  
  1464  func (s *TimerLayerChannelStore) InvalidateGuestCount(channelId string) {
  1465  	start := timemodule.Now()
  1466  
  1467  	s.ChannelStore.InvalidateGuestCount(channelId)
  1468  
  1469  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1470  	if s.Root.Metrics != nil {
  1471  		success := "false"
  1472  		if true {
  1473  			success = "true"
  1474  		}
  1475  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateGuestCount", success, elapsed)
  1476  	}
  1477  }
  1478  
  1479  func (s *TimerLayerChannelStore) InvalidateMemberCount(channelId string) {
  1480  	start := timemodule.Now()
  1481  
  1482  	s.ChannelStore.InvalidateMemberCount(channelId)
  1483  
  1484  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1485  	if s.Root.Metrics != nil {
  1486  		success := "false"
  1487  		if true {
  1488  			success = "true"
  1489  		}
  1490  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidateMemberCount", success, elapsed)
  1491  	}
  1492  }
  1493  
  1494  func (s *TimerLayerChannelStore) InvalidatePinnedPostCount(channelId string) {
  1495  	start := timemodule.Now()
  1496  
  1497  	s.ChannelStore.InvalidatePinnedPostCount(channelId)
  1498  
  1499  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1500  	if s.Root.Metrics != nil {
  1501  		success := "false"
  1502  		if true {
  1503  			success = "true"
  1504  		}
  1505  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidatePinnedPostCount", success, elapsed)
  1506  	}
  1507  }
  1508  
  1509  func (s *TimerLayerChannelStore) IsUserInChannelUseCache(userId string, channelId string) bool {
  1510  	start := timemodule.Now()
  1511  
  1512  	resultVar0 := s.ChannelStore.IsUserInChannelUseCache(userId, channelId)
  1513  
  1514  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1515  	if s.Root.Metrics != nil {
  1516  		success := "false"
  1517  		if true {
  1518  			success = "true"
  1519  		}
  1520  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.IsUserInChannelUseCache", success, elapsed)
  1521  	}
  1522  	return resultVar0
  1523  }
  1524  
  1525  func (s *TimerLayerChannelStore) MigrateChannelMembers(fromChannelId string, fromUserId string) (map[string]string, *model.AppError) {
  1526  	start := timemodule.Now()
  1527  
  1528  	resultVar0, resultVar1 := s.ChannelStore.MigrateChannelMembers(fromChannelId, fromUserId)
  1529  
  1530  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1531  	if s.Root.Metrics != nil {
  1532  		success := "false"
  1533  		if resultVar1 == nil {
  1534  			success = "true"
  1535  		}
  1536  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.MigrateChannelMembers", success, elapsed)
  1537  	}
  1538  	return resultVar0, resultVar1
  1539  }
  1540  
  1541  func (s *TimerLayerChannelStore) MigratePublicChannels() error {
  1542  	start := timemodule.Now()
  1543  
  1544  	resultVar0 := s.ChannelStore.MigratePublicChannels()
  1545  
  1546  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1547  	if s.Root.Metrics != nil {
  1548  		success := "false"
  1549  		if resultVar0 == nil {
  1550  			success = "true"
  1551  		}
  1552  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.MigratePublicChannels", success, elapsed)
  1553  	}
  1554  	return resultVar0
  1555  }
  1556  
  1557  func (s *TimerLayerChannelStore) PermanentDelete(channelId string) error {
  1558  	start := timemodule.Now()
  1559  
  1560  	resultVar0 := s.ChannelStore.PermanentDelete(channelId)
  1561  
  1562  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1563  	if s.Root.Metrics != nil {
  1564  		success := "false"
  1565  		if resultVar0 == nil {
  1566  			success = "true"
  1567  		}
  1568  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.PermanentDelete", success, elapsed)
  1569  	}
  1570  	return resultVar0
  1571  }
  1572  
  1573  func (s *TimerLayerChannelStore) PermanentDeleteByTeam(teamId string) error {
  1574  	start := timemodule.Now()
  1575  
  1576  	resultVar0 := s.ChannelStore.PermanentDeleteByTeam(teamId)
  1577  
  1578  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1579  	if s.Root.Metrics != nil {
  1580  		success := "false"
  1581  		if resultVar0 == nil {
  1582  			success = "true"
  1583  		}
  1584  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.PermanentDeleteByTeam", success, elapsed)
  1585  	}
  1586  	return resultVar0
  1587  }
  1588  
  1589  func (s *TimerLayerChannelStore) PermanentDeleteMembersByChannel(channelId string) *model.AppError {
  1590  	start := timemodule.Now()
  1591  
  1592  	resultVar0 := s.ChannelStore.PermanentDeleteMembersByChannel(channelId)
  1593  
  1594  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1595  	if s.Root.Metrics != nil {
  1596  		success := "false"
  1597  		if resultVar0 == nil {
  1598  			success = "true"
  1599  		}
  1600  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.PermanentDeleteMembersByChannel", success, elapsed)
  1601  	}
  1602  	return resultVar0
  1603  }
  1604  
  1605  func (s *TimerLayerChannelStore) PermanentDeleteMembersByUser(userId string) *model.AppError {
  1606  	start := timemodule.Now()
  1607  
  1608  	resultVar0 := s.ChannelStore.PermanentDeleteMembersByUser(userId)
  1609  
  1610  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1611  	if s.Root.Metrics != nil {
  1612  		success := "false"
  1613  		if resultVar0 == nil {
  1614  			success = "true"
  1615  		}
  1616  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.PermanentDeleteMembersByUser", success, elapsed)
  1617  	}
  1618  	return resultVar0
  1619  }
  1620  
  1621  func (s *TimerLayerChannelStore) RemoveAllDeactivatedMembers(channelId string) *model.AppError {
  1622  	start := timemodule.Now()
  1623  
  1624  	resultVar0 := s.ChannelStore.RemoveAllDeactivatedMembers(channelId)
  1625  
  1626  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1627  	if s.Root.Metrics != nil {
  1628  		success := "false"
  1629  		if resultVar0 == nil {
  1630  			success = "true"
  1631  		}
  1632  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.RemoveAllDeactivatedMembers", success, elapsed)
  1633  	}
  1634  	return resultVar0
  1635  }
  1636  
  1637  func (s *TimerLayerChannelStore) RemoveMember(channelId string, userId string) *model.AppError {
  1638  	start := timemodule.Now()
  1639  
  1640  	resultVar0 := s.ChannelStore.RemoveMember(channelId, userId)
  1641  
  1642  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1643  	if s.Root.Metrics != nil {
  1644  		success := "false"
  1645  		if resultVar0 == nil {
  1646  			success = "true"
  1647  		}
  1648  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.RemoveMember", success, elapsed)
  1649  	}
  1650  	return resultVar0
  1651  }
  1652  
  1653  func (s *TimerLayerChannelStore) RemoveMembers(channelId string, userIds []string) *model.AppError {
  1654  	start := timemodule.Now()
  1655  
  1656  	resultVar0 := s.ChannelStore.RemoveMembers(channelId, userIds)
  1657  
  1658  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1659  	if s.Root.Metrics != nil {
  1660  		success := "false"
  1661  		if resultVar0 == nil {
  1662  			success = "true"
  1663  		}
  1664  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.RemoveMembers", success, elapsed)
  1665  	}
  1666  	return resultVar0
  1667  }
  1668  
  1669  func (s *TimerLayerChannelStore) ResetAllChannelSchemes() *model.AppError {
  1670  	start := timemodule.Now()
  1671  
  1672  	resultVar0 := s.ChannelStore.ResetAllChannelSchemes()
  1673  
  1674  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1675  	if s.Root.Metrics != nil {
  1676  		success := "false"
  1677  		if resultVar0 == nil {
  1678  			success = "true"
  1679  		}
  1680  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.ResetAllChannelSchemes", success, elapsed)
  1681  	}
  1682  	return resultVar0
  1683  }
  1684  
  1685  func (s *TimerLayerChannelStore) Restore(channelId string, time int64) error {
  1686  	start := timemodule.Now()
  1687  
  1688  	resultVar0 := s.ChannelStore.Restore(channelId, time)
  1689  
  1690  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1691  	if s.Root.Metrics != nil {
  1692  		success := "false"
  1693  		if resultVar0 == nil {
  1694  			success = "true"
  1695  		}
  1696  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.Restore", success, elapsed)
  1697  	}
  1698  	return resultVar0
  1699  }
  1700  
  1701  func (s *TimerLayerChannelStore) Save(channel *model.Channel, maxChannelsPerTeam int64) (*model.Channel, error) {
  1702  	start := timemodule.Now()
  1703  
  1704  	resultVar0, resultVar1 := s.ChannelStore.Save(channel, maxChannelsPerTeam)
  1705  
  1706  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1707  	if s.Root.Metrics != nil {
  1708  		success := "false"
  1709  		if resultVar1 == nil {
  1710  			success = "true"
  1711  		}
  1712  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.Save", success, elapsed)
  1713  	}
  1714  	return resultVar0, resultVar1
  1715  }
  1716  
  1717  func (s *TimerLayerChannelStore) SaveDirectChannel(channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) (*model.Channel, error) {
  1718  	start := timemodule.Now()
  1719  
  1720  	resultVar0, resultVar1 := s.ChannelStore.SaveDirectChannel(channel, member1, member2)
  1721  
  1722  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1723  	if s.Root.Metrics != nil {
  1724  		success := "false"
  1725  		if resultVar1 == nil {
  1726  			success = "true"
  1727  		}
  1728  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.SaveDirectChannel", success, elapsed)
  1729  	}
  1730  	return resultVar0, resultVar1
  1731  }
  1732  
  1733  func (s *TimerLayerChannelStore) SaveMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) {
  1734  	start := timemodule.Now()
  1735  
  1736  	resultVar0, resultVar1 := s.ChannelStore.SaveMember(member)
  1737  
  1738  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1739  	if s.Root.Metrics != nil {
  1740  		success := "false"
  1741  		if resultVar1 == nil {
  1742  			success = "true"
  1743  		}
  1744  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.SaveMember", success, elapsed)
  1745  	}
  1746  	return resultVar0, resultVar1
  1747  }
  1748  
  1749  func (s *TimerLayerChannelStore) SaveMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, *model.AppError) {
  1750  	start := timemodule.Now()
  1751  
  1752  	resultVar0, resultVar1 := s.ChannelStore.SaveMultipleMembers(members)
  1753  
  1754  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1755  	if s.Root.Metrics != nil {
  1756  		success := "false"
  1757  		if resultVar1 == nil {
  1758  			success = "true"
  1759  		}
  1760  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.SaveMultipleMembers", success, elapsed)
  1761  	}
  1762  	return resultVar0, resultVar1
  1763  }
  1764  
  1765  func (s *TimerLayerChannelStore) SearchAllChannels(term string, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, *model.AppError) {
  1766  	start := timemodule.Now()
  1767  
  1768  	resultVar0, resultVar1, resultVar2 := s.ChannelStore.SearchAllChannels(term, opts)
  1769  
  1770  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1771  	if s.Root.Metrics != nil {
  1772  		success := "false"
  1773  		if resultVar2 == nil {
  1774  			success = "true"
  1775  		}
  1776  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.SearchAllChannels", success, elapsed)
  1777  	}
  1778  	return resultVar0, resultVar1, resultVar2
  1779  }
  1780  
  1781  func (s *TimerLayerChannelStore) SearchArchivedInTeam(teamId string, term string, userId string) (*model.ChannelList, *model.AppError) {
  1782  	start := timemodule.Now()
  1783  
  1784  	resultVar0, resultVar1 := s.ChannelStore.SearchArchivedInTeam(teamId, term, userId)
  1785  
  1786  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1787  	if s.Root.Metrics != nil {
  1788  		success := "false"
  1789  		if resultVar1 == nil {
  1790  			success = "true"
  1791  		}
  1792  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.SearchArchivedInTeam", success, elapsed)
  1793  	}
  1794  	return resultVar0, resultVar1
  1795  }
  1796  
  1797  func (s *TimerLayerChannelStore) SearchForUserInTeam(userId string, teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
  1798  	start := timemodule.Now()
  1799  
  1800  	resultVar0, resultVar1 := s.ChannelStore.SearchForUserInTeam(userId, teamId, term, includeDeleted)
  1801  
  1802  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1803  	if s.Root.Metrics != nil {
  1804  		success := "false"
  1805  		if resultVar1 == nil {
  1806  			success = "true"
  1807  		}
  1808  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.SearchForUserInTeam", success, elapsed)
  1809  	}
  1810  	return resultVar0, resultVar1
  1811  }
  1812  
  1813  func (s *TimerLayerChannelStore) SearchGroupChannels(userId string, term string) (*model.ChannelList, *model.AppError) {
  1814  	start := timemodule.Now()
  1815  
  1816  	resultVar0, resultVar1 := s.ChannelStore.SearchGroupChannels(userId, term)
  1817  
  1818  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1819  	if s.Root.Metrics != nil {
  1820  		success := "false"
  1821  		if resultVar1 == nil {
  1822  			success = "true"
  1823  		}
  1824  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.SearchGroupChannels", success, elapsed)
  1825  	}
  1826  	return resultVar0, resultVar1
  1827  }
  1828  
  1829  func (s *TimerLayerChannelStore) SearchInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
  1830  	start := timemodule.Now()
  1831  
  1832  	resultVar0, resultVar1 := s.ChannelStore.SearchInTeam(teamId, term, includeDeleted)
  1833  
  1834  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1835  	if s.Root.Metrics != nil {
  1836  		success := "false"
  1837  		if resultVar1 == nil {
  1838  			success = "true"
  1839  		}
  1840  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.SearchInTeam", success, elapsed)
  1841  	}
  1842  	return resultVar0, resultVar1
  1843  }
  1844  
  1845  func (s *TimerLayerChannelStore) SearchMore(userId string, teamId string, term string) (*model.ChannelList, *model.AppError) {
  1846  	start := timemodule.Now()
  1847  
  1848  	resultVar0, resultVar1 := s.ChannelStore.SearchMore(userId, teamId, term)
  1849  
  1850  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1851  	if s.Root.Metrics != nil {
  1852  		success := "false"
  1853  		if resultVar1 == nil {
  1854  			success = "true"
  1855  		}
  1856  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.SearchMore", success, elapsed)
  1857  	}
  1858  	return resultVar0, resultVar1
  1859  }
  1860  
  1861  func (s *TimerLayerChannelStore) SetDeleteAt(channelId string, deleteAt int64, updateAt int64) error {
  1862  	start := timemodule.Now()
  1863  
  1864  	resultVar0 := s.ChannelStore.SetDeleteAt(channelId, deleteAt, updateAt)
  1865  
  1866  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1867  	if s.Root.Metrics != nil {
  1868  		success := "false"
  1869  		if resultVar0 == nil {
  1870  			success = "true"
  1871  		}
  1872  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.SetDeleteAt", success, elapsed)
  1873  	}
  1874  	return resultVar0
  1875  }
  1876  
  1877  func (s *TimerLayerChannelStore) Update(channel *model.Channel) (*model.Channel, error) {
  1878  	start := timemodule.Now()
  1879  
  1880  	resultVar0, resultVar1 := s.ChannelStore.Update(channel)
  1881  
  1882  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1883  	if s.Root.Metrics != nil {
  1884  		success := "false"
  1885  		if resultVar1 == nil {
  1886  			success = "true"
  1887  		}
  1888  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.Update", success, elapsed)
  1889  	}
  1890  	return resultVar0, resultVar1
  1891  }
  1892  
  1893  func (s *TimerLayerChannelStore) UpdateLastViewedAt(channelIds []string, userId string) (map[string]int64, *model.AppError) {
  1894  	start := timemodule.Now()
  1895  
  1896  	resultVar0, resultVar1 := s.ChannelStore.UpdateLastViewedAt(channelIds, userId)
  1897  
  1898  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1899  	if s.Root.Metrics != nil {
  1900  		success := "false"
  1901  		if resultVar1 == nil {
  1902  			success = "true"
  1903  		}
  1904  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.UpdateLastViewedAt", success, elapsed)
  1905  	}
  1906  	return resultVar0, resultVar1
  1907  }
  1908  
  1909  func (s *TimerLayerChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int) (*model.ChannelUnreadAt, *model.AppError) {
  1910  	start := timemodule.Now()
  1911  
  1912  	resultVar0, resultVar1 := s.ChannelStore.UpdateLastViewedAtPost(unreadPost, userID, mentionCount)
  1913  
  1914  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1915  	if s.Root.Metrics != nil {
  1916  		success := "false"
  1917  		if resultVar1 == nil {
  1918  			success = "true"
  1919  		}
  1920  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.UpdateLastViewedAtPost", success, elapsed)
  1921  	}
  1922  	return resultVar0, resultVar1
  1923  }
  1924  
  1925  func (s *TimerLayerChannelStore) UpdateMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) {
  1926  	start := timemodule.Now()
  1927  
  1928  	resultVar0, resultVar1 := s.ChannelStore.UpdateMember(member)
  1929  
  1930  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1931  	if s.Root.Metrics != nil {
  1932  		success := "false"
  1933  		if resultVar1 == nil {
  1934  			success = "true"
  1935  		}
  1936  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.UpdateMember", success, elapsed)
  1937  	}
  1938  	return resultVar0, resultVar1
  1939  }
  1940  
  1941  func (s *TimerLayerChannelStore) UpdateMembersRole(channelID string, userIDs []string) *model.AppError {
  1942  	start := timemodule.Now()
  1943  
  1944  	resultVar0 := s.ChannelStore.UpdateMembersRole(channelID, userIDs)
  1945  
  1946  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1947  	if s.Root.Metrics != nil {
  1948  		success := "false"
  1949  		if resultVar0 == nil {
  1950  			success = "true"
  1951  		}
  1952  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.UpdateMembersRole", success, elapsed)
  1953  	}
  1954  	return resultVar0
  1955  }
  1956  
  1957  func (s *TimerLayerChannelStore) UpdateMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, *model.AppError) {
  1958  	start := timemodule.Now()
  1959  
  1960  	resultVar0, resultVar1 := s.ChannelStore.UpdateMultipleMembers(members)
  1961  
  1962  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1963  	if s.Root.Metrics != nil {
  1964  		success := "false"
  1965  		if resultVar1 == nil {
  1966  			success = "true"
  1967  		}
  1968  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.UpdateMultipleMembers", success, elapsed)
  1969  	}
  1970  	return resultVar0, resultVar1
  1971  }
  1972  
  1973  func (s *TimerLayerChannelStore) UpdateSidebarCategories(userId string, teamId string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError) {
  1974  	start := timemodule.Now()
  1975  
  1976  	resultVar0, resultVar1 := s.ChannelStore.UpdateSidebarCategories(userId, teamId, categories)
  1977  
  1978  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1979  	if s.Root.Metrics != nil {
  1980  		success := "false"
  1981  		if resultVar1 == nil {
  1982  			success = "true"
  1983  		}
  1984  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.UpdateSidebarCategories", success, elapsed)
  1985  	}
  1986  	return resultVar0, resultVar1
  1987  }
  1988  
  1989  func (s *TimerLayerChannelStore) UpdateSidebarCategoryOrder(userId string, teamId string, categoryOrder []string) *model.AppError {
  1990  	start := timemodule.Now()
  1991  
  1992  	resultVar0 := s.ChannelStore.UpdateSidebarCategoryOrder(userId, teamId, categoryOrder)
  1993  
  1994  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  1995  	if s.Root.Metrics != nil {
  1996  		success := "false"
  1997  		if resultVar0 == nil {
  1998  			success = "true"
  1999  		}
  2000  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.UpdateSidebarCategoryOrder", success, elapsed)
  2001  	}
  2002  	return resultVar0
  2003  }
  2004  
  2005  func (s *TimerLayerChannelStore) UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamId string) *model.AppError {
  2006  	start := timemodule.Now()
  2007  
  2008  	resultVar0 := s.ChannelStore.UpdateSidebarChannelCategoryOnMove(channel, newTeamId)
  2009  
  2010  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2011  	if s.Root.Metrics != nil {
  2012  		success := "false"
  2013  		if resultVar0 == nil {
  2014  			success = "true"
  2015  		}
  2016  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.UpdateSidebarChannelCategoryOnMove", success, elapsed)
  2017  	}
  2018  	return resultVar0
  2019  }
  2020  
  2021  func (s *TimerLayerChannelStore) UpdateSidebarChannelsByPreferences(preferences *model.Preferences) error {
  2022  	start := timemodule.Now()
  2023  
  2024  	resultVar0 := s.ChannelStore.UpdateSidebarChannelsByPreferences(preferences)
  2025  
  2026  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2027  	if s.Root.Metrics != nil {
  2028  		success := "false"
  2029  		if resultVar0 == nil {
  2030  			success = "true"
  2031  		}
  2032  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.UpdateSidebarChannelsByPreferences", success, elapsed)
  2033  	}
  2034  	return resultVar0
  2035  }
  2036  
  2037  func (s *TimerLayerChannelStore) UserBelongsToChannels(userId string, channelIds []string) (bool, *model.AppError) {
  2038  	start := timemodule.Now()
  2039  
  2040  	resultVar0, resultVar1 := s.ChannelStore.UserBelongsToChannels(userId, channelIds)
  2041  
  2042  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2043  	if s.Root.Metrics != nil {
  2044  		success := "false"
  2045  		if resultVar1 == nil {
  2046  			success = "true"
  2047  		}
  2048  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.UserBelongsToChannels", success, elapsed)
  2049  	}
  2050  	return resultVar0, resultVar1
  2051  }
  2052  
  2053  func (s *TimerLayerChannelMemberHistoryStore) GetUsersInChannelDuring(startTime int64, endTime int64, channelId string) ([]*model.ChannelMemberHistoryResult, error) {
  2054  	start := timemodule.Now()
  2055  
  2056  	resultVar0, resultVar1 := s.ChannelMemberHistoryStore.GetUsersInChannelDuring(startTime, endTime, channelId)
  2057  
  2058  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2059  	if s.Root.Metrics != nil {
  2060  		success := "false"
  2061  		if resultVar1 == nil {
  2062  			success = "true"
  2063  		}
  2064  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelMemberHistoryStore.GetUsersInChannelDuring", success, elapsed)
  2065  	}
  2066  	return resultVar0, resultVar1
  2067  }
  2068  
  2069  func (s *TimerLayerChannelMemberHistoryStore) LogJoinEvent(userId string, channelId string, joinTime int64) error {
  2070  	start := timemodule.Now()
  2071  
  2072  	resultVar0 := s.ChannelMemberHistoryStore.LogJoinEvent(userId, channelId, joinTime)
  2073  
  2074  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2075  	if s.Root.Metrics != nil {
  2076  		success := "false"
  2077  		if resultVar0 == nil {
  2078  			success = "true"
  2079  		}
  2080  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelMemberHistoryStore.LogJoinEvent", success, elapsed)
  2081  	}
  2082  	return resultVar0
  2083  }
  2084  
  2085  func (s *TimerLayerChannelMemberHistoryStore) LogLeaveEvent(userId string, channelId string, leaveTime int64) error {
  2086  	start := timemodule.Now()
  2087  
  2088  	resultVar0 := s.ChannelMemberHistoryStore.LogLeaveEvent(userId, channelId, leaveTime)
  2089  
  2090  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2091  	if s.Root.Metrics != nil {
  2092  		success := "false"
  2093  		if resultVar0 == nil {
  2094  			success = "true"
  2095  		}
  2096  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelMemberHistoryStore.LogLeaveEvent", success, elapsed)
  2097  	}
  2098  	return resultVar0
  2099  }
  2100  
  2101  func (s *TimerLayerChannelMemberHistoryStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, error) {
  2102  	start := timemodule.Now()
  2103  
  2104  	resultVar0, resultVar1 := s.ChannelMemberHistoryStore.PermanentDeleteBatch(endTime, limit)
  2105  
  2106  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2107  	if s.Root.Metrics != nil {
  2108  		success := "false"
  2109  		if resultVar1 == nil {
  2110  			success = "true"
  2111  		}
  2112  		s.Root.Metrics.ObserveStoreMethodDuration("ChannelMemberHistoryStore.PermanentDeleteBatch", success, elapsed)
  2113  	}
  2114  	return resultVar0, resultVar1
  2115  }
  2116  
  2117  func (s *TimerLayerClusterDiscoveryStore) Cleanup() error {
  2118  	start := timemodule.Now()
  2119  
  2120  	resultVar0 := s.ClusterDiscoveryStore.Cleanup()
  2121  
  2122  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2123  	if s.Root.Metrics != nil {
  2124  		success := "false"
  2125  		if resultVar0 == nil {
  2126  			success = "true"
  2127  		}
  2128  		s.Root.Metrics.ObserveStoreMethodDuration("ClusterDiscoveryStore.Cleanup", success, elapsed)
  2129  	}
  2130  	return resultVar0
  2131  }
  2132  
  2133  func (s *TimerLayerClusterDiscoveryStore) Delete(discovery *model.ClusterDiscovery) (bool, error) {
  2134  	start := timemodule.Now()
  2135  
  2136  	resultVar0, resultVar1 := s.ClusterDiscoveryStore.Delete(discovery)
  2137  
  2138  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2139  	if s.Root.Metrics != nil {
  2140  		success := "false"
  2141  		if resultVar1 == nil {
  2142  			success = "true"
  2143  		}
  2144  		s.Root.Metrics.ObserveStoreMethodDuration("ClusterDiscoveryStore.Delete", success, elapsed)
  2145  	}
  2146  	return resultVar0, resultVar1
  2147  }
  2148  
  2149  func (s *TimerLayerClusterDiscoveryStore) Exists(discovery *model.ClusterDiscovery) (bool, error) {
  2150  	start := timemodule.Now()
  2151  
  2152  	resultVar0, resultVar1 := s.ClusterDiscoveryStore.Exists(discovery)
  2153  
  2154  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2155  	if s.Root.Metrics != nil {
  2156  		success := "false"
  2157  		if resultVar1 == nil {
  2158  			success = "true"
  2159  		}
  2160  		s.Root.Metrics.ObserveStoreMethodDuration("ClusterDiscoveryStore.Exists", success, elapsed)
  2161  	}
  2162  	return resultVar0, resultVar1
  2163  }
  2164  
  2165  func (s *TimerLayerClusterDiscoveryStore) GetAll(discoveryType string, clusterName string) ([]*model.ClusterDiscovery, error) {
  2166  	start := timemodule.Now()
  2167  
  2168  	resultVar0, resultVar1 := s.ClusterDiscoveryStore.GetAll(discoveryType, clusterName)
  2169  
  2170  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2171  	if s.Root.Metrics != nil {
  2172  		success := "false"
  2173  		if resultVar1 == nil {
  2174  			success = "true"
  2175  		}
  2176  		s.Root.Metrics.ObserveStoreMethodDuration("ClusterDiscoveryStore.GetAll", success, elapsed)
  2177  	}
  2178  	return resultVar0, resultVar1
  2179  }
  2180  
  2181  func (s *TimerLayerClusterDiscoveryStore) Save(discovery *model.ClusterDiscovery) error {
  2182  	start := timemodule.Now()
  2183  
  2184  	resultVar0 := s.ClusterDiscoveryStore.Save(discovery)
  2185  
  2186  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2187  	if s.Root.Metrics != nil {
  2188  		success := "false"
  2189  		if resultVar0 == nil {
  2190  			success = "true"
  2191  		}
  2192  		s.Root.Metrics.ObserveStoreMethodDuration("ClusterDiscoveryStore.Save", success, elapsed)
  2193  	}
  2194  	return resultVar0
  2195  }
  2196  
  2197  func (s *TimerLayerClusterDiscoveryStore) SetLastPingAt(discovery *model.ClusterDiscovery) error {
  2198  	start := timemodule.Now()
  2199  
  2200  	resultVar0 := s.ClusterDiscoveryStore.SetLastPingAt(discovery)
  2201  
  2202  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2203  	if s.Root.Metrics != nil {
  2204  		success := "false"
  2205  		if resultVar0 == nil {
  2206  			success = "true"
  2207  		}
  2208  		s.Root.Metrics.ObserveStoreMethodDuration("ClusterDiscoveryStore.SetLastPingAt", success, elapsed)
  2209  	}
  2210  	return resultVar0
  2211  }
  2212  
  2213  func (s *TimerLayerCommandStore) AnalyticsCommandCount(teamId string) (int64, error) {
  2214  	start := timemodule.Now()
  2215  
  2216  	resultVar0, resultVar1 := s.CommandStore.AnalyticsCommandCount(teamId)
  2217  
  2218  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2219  	if s.Root.Metrics != nil {
  2220  		success := "false"
  2221  		if resultVar1 == nil {
  2222  			success = "true"
  2223  		}
  2224  		s.Root.Metrics.ObserveStoreMethodDuration("CommandStore.AnalyticsCommandCount", success, elapsed)
  2225  	}
  2226  	return resultVar0, resultVar1
  2227  }
  2228  
  2229  func (s *TimerLayerCommandStore) Delete(commandId string, time int64) error {
  2230  	start := timemodule.Now()
  2231  
  2232  	resultVar0 := s.CommandStore.Delete(commandId, time)
  2233  
  2234  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2235  	if s.Root.Metrics != nil {
  2236  		success := "false"
  2237  		if resultVar0 == nil {
  2238  			success = "true"
  2239  		}
  2240  		s.Root.Metrics.ObserveStoreMethodDuration("CommandStore.Delete", success, elapsed)
  2241  	}
  2242  	return resultVar0
  2243  }
  2244  
  2245  func (s *TimerLayerCommandStore) Get(id string) (*model.Command, error) {
  2246  	start := timemodule.Now()
  2247  
  2248  	resultVar0, resultVar1 := s.CommandStore.Get(id)
  2249  
  2250  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2251  	if s.Root.Metrics != nil {
  2252  		success := "false"
  2253  		if resultVar1 == nil {
  2254  			success = "true"
  2255  		}
  2256  		s.Root.Metrics.ObserveStoreMethodDuration("CommandStore.Get", success, elapsed)
  2257  	}
  2258  	return resultVar0, resultVar1
  2259  }
  2260  
  2261  func (s *TimerLayerCommandStore) GetByTeam(teamId string) ([]*model.Command, error) {
  2262  	start := timemodule.Now()
  2263  
  2264  	resultVar0, resultVar1 := s.CommandStore.GetByTeam(teamId)
  2265  
  2266  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2267  	if s.Root.Metrics != nil {
  2268  		success := "false"
  2269  		if resultVar1 == nil {
  2270  			success = "true"
  2271  		}
  2272  		s.Root.Metrics.ObserveStoreMethodDuration("CommandStore.GetByTeam", success, elapsed)
  2273  	}
  2274  	return resultVar0, resultVar1
  2275  }
  2276  
  2277  func (s *TimerLayerCommandStore) GetByTrigger(teamId string, trigger string) (*model.Command, error) {
  2278  	start := timemodule.Now()
  2279  
  2280  	resultVar0, resultVar1 := s.CommandStore.GetByTrigger(teamId, trigger)
  2281  
  2282  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2283  	if s.Root.Metrics != nil {
  2284  		success := "false"
  2285  		if resultVar1 == nil {
  2286  			success = "true"
  2287  		}
  2288  		s.Root.Metrics.ObserveStoreMethodDuration("CommandStore.GetByTrigger", success, elapsed)
  2289  	}
  2290  	return resultVar0, resultVar1
  2291  }
  2292  
  2293  func (s *TimerLayerCommandStore) PermanentDeleteByTeam(teamId string) error {
  2294  	start := timemodule.Now()
  2295  
  2296  	resultVar0 := s.CommandStore.PermanentDeleteByTeam(teamId)
  2297  
  2298  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2299  	if s.Root.Metrics != nil {
  2300  		success := "false"
  2301  		if resultVar0 == nil {
  2302  			success = "true"
  2303  		}
  2304  		s.Root.Metrics.ObserveStoreMethodDuration("CommandStore.PermanentDeleteByTeam", success, elapsed)
  2305  	}
  2306  	return resultVar0
  2307  }
  2308  
  2309  func (s *TimerLayerCommandStore) PermanentDeleteByUser(userId string) error {
  2310  	start := timemodule.Now()
  2311  
  2312  	resultVar0 := s.CommandStore.PermanentDeleteByUser(userId)
  2313  
  2314  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2315  	if s.Root.Metrics != nil {
  2316  		success := "false"
  2317  		if resultVar0 == nil {
  2318  			success = "true"
  2319  		}
  2320  		s.Root.Metrics.ObserveStoreMethodDuration("CommandStore.PermanentDeleteByUser", success, elapsed)
  2321  	}
  2322  	return resultVar0
  2323  }
  2324  
  2325  func (s *TimerLayerCommandStore) Save(webhook *model.Command) (*model.Command, error) {
  2326  	start := timemodule.Now()
  2327  
  2328  	resultVar0, resultVar1 := s.CommandStore.Save(webhook)
  2329  
  2330  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2331  	if s.Root.Metrics != nil {
  2332  		success := "false"
  2333  		if resultVar1 == nil {
  2334  			success = "true"
  2335  		}
  2336  		s.Root.Metrics.ObserveStoreMethodDuration("CommandStore.Save", success, elapsed)
  2337  	}
  2338  	return resultVar0, resultVar1
  2339  }
  2340  
  2341  func (s *TimerLayerCommandStore) Update(hook *model.Command) (*model.Command, error) {
  2342  	start := timemodule.Now()
  2343  
  2344  	resultVar0, resultVar1 := s.CommandStore.Update(hook)
  2345  
  2346  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2347  	if s.Root.Metrics != nil {
  2348  		success := "false"
  2349  		if resultVar1 == nil {
  2350  			success = "true"
  2351  		}
  2352  		s.Root.Metrics.ObserveStoreMethodDuration("CommandStore.Update", success, elapsed)
  2353  	}
  2354  	return resultVar0, resultVar1
  2355  }
  2356  
  2357  func (s *TimerLayerCommandWebhookStore) Cleanup() {
  2358  	start := timemodule.Now()
  2359  
  2360  	s.CommandWebhookStore.Cleanup()
  2361  
  2362  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2363  	if s.Root.Metrics != nil {
  2364  		success := "false"
  2365  		if true {
  2366  			success = "true"
  2367  		}
  2368  		s.Root.Metrics.ObserveStoreMethodDuration("CommandWebhookStore.Cleanup", success, elapsed)
  2369  	}
  2370  }
  2371  
  2372  func (s *TimerLayerCommandWebhookStore) Get(id string) (*model.CommandWebhook, error) {
  2373  	start := timemodule.Now()
  2374  
  2375  	resultVar0, resultVar1 := s.CommandWebhookStore.Get(id)
  2376  
  2377  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2378  	if s.Root.Metrics != nil {
  2379  		success := "false"
  2380  		if resultVar1 == nil {
  2381  			success = "true"
  2382  		}
  2383  		s.Root.Metrics.ObserveStoreMethodDuration("CommandWebhookStore.Get", success, elapsed)
  2384  	}
  2385  	return resultVar0, resultVar1
  2386  }
  2387  
  2388  func (s *TimerLayerCommandWebhookStore) Save(webhook *model.CommandWebhook) (*model.CommandWebhook, error) {
  2389  	start := timemodule.Now()
  2390  
  2391  	resultVar0, resultVar1 := s.CommandWebhookStore.Save(webhook)
  2392  
  2393  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2394  	if s.Root.Metrics != nil {
  2395  		success := "false"
  2396  		if resultVar1 == nil {
  2397  			success = "true"
  2398  		}
  2399  		s.Root.Metrics.ObserveStoreMethodDuration("CommandWebhookStore.Save", success, elapsed)
  2400  	}
  2401  	return resultVar0, resultVar1
  2402  }
  2403  
  2404  func (s *TimerLayerCommandWebhookStore) TryUse(id string, limit int) error {
  2405  	start := timemodule.Now()
  2406  
  2407  	resultVar0 := s.CommandWebhookStore.TryUse(id, limit)
  2408  
  2409  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2410  	if s.Root.Metrics != nil {
  2411  		success := "false"
  2412  		if resultVar0 == nil {
  2413  			success = "true"
  2414  		}
  2415  		s.Root.Metrics.ObserveStoreMethodDuration("CommandWebhookStore.TryUse", success, elapsed)
  2416  	}
  2417  	return resultVar0
  2418  }
  2419  
  2420  func (s *TimerLayerComplianceStore) ComplianceExport(compliance *model.Compliance) ([]*model.CompliancePost, error) {
  2421  	start := timemodule.Now()
  2422  
  2423  	resultVar0, resultVar1 := s.ComplianceStore.ComplianceExport(compliance)
  2424  
  2425  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2426  	if s.Root.Metrics != nil {
  2427  		success := "false"
  2428  		if resultVar1 == nil {
  2429  			success = "true"
  2430  		}
  2431  		s.Root.Metrics.ObserveStoreMethodDuration("ComplianceStore.ComplianceExport", success, elapsed)
  2432  	}
  2433  	return resultVar0, resultVar1
  2434  }
  2435  
  2436  func (s *TimerLayerComplianceStore) Get(id string) (*model.Compliance, error) {
  2437  	start := timemodule.Now()
  2438  
  2439  	resultVar0, resultVar1 := s.ComplianceStore.Get(id)
  2440  
  2441  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2442  	if s.Root.Metrics != nil {
  2443  		success := "false"
  2444  		if resultVar1 == nil {
  2445  			success = "true"
  2446  		}
  2447  		s.Root.Metrics.ObserveStoreMethodDuration("ComplianceStore.Get", success, elapsed)
  2448  	}
  2449  	return resultVar0, resultVar1
  2450  }
  2451  
  2452  func (s *TimerLayerComplianceStore) GetAll(offset int, limit int) (model.Compliances, error) {
  2453  	start := timemodule.Now()
  2454  
  2455  	resultVar0, resultVar1 := s.ComplianceStore.GetAll(offset, limit)
  2456  
  2457  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2458  	if s.Root.Metrics != nil {
  2459  		success := "false"
  2460  		if resultVar1 == nil {
  2461  			success = "true"
  2462  		}
  2463  		s.Root.Metrics.ObserveStoreMethodDuration("ComplianceStore.GetAll", success, elapsed)
  2464  	}
  2465  	return resultVar0, resultVar1
  2466  }
  2467  
  2468  func (s *TimerLayerComplianceStore) MessageExport(after int64, limit int) ([]*model.MessageExport, error) {
  2469  	start := timemodule.Now()
  2470  
  2471  	resultVar0, resultVar1 := s.ComplianceStore.MessageExport(after, limit)
  2472  
  2473  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2474  	if s.Root.Metrics != nil {
  2475  		success := "false"
  2476  		if resultVar1 == nil {
  2477  			success = "true"
  2478  		}
  2479  		s.Root.Metrics.ObserveStoreMethodDuration("ComplianceStore.MessageExport", success, elapsed)
  2480  	}
  2481  	return resultVar0, resultVar1
  2482  }
  2483  
  2484  func (s *TimerLayerComplianceStore) Save(compliance *model.Compliance) (*model.Compliance, error) {
  2485  	start := timemodule.Now()
  2486  
  2487  	resultVar0, resultVar1 := s.ComplianceStore.Save(compliance)
  2488  
  2489  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2490  	if s.Root.Metrics != nil {
  2491  		success := "false"
  2492  		if resultVar1 == nil {
  2493  			success = "true"
  2494  		}
  2495  		s.Root.Metrics.ObserveStoreMethodDuration("ComplianceStore.Save", success, elapsed)
  2496  	}
  2497  	return resultVar0, resultVar1
  2498  }
  2499  
  2500  func (s *TimerLayerComplianceStore) Update(compliance *model.Compliance) (*model.Compliance, error) {
  2501  	start := timemodule.Now()
  2502  
  2503  	resultVar0, resultVar1 := s.ComplianceStore.Update(compliance)
  2504  
  2505  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2506  	if s.Root.Metrics != nil {
  2507  		success := "false"
  2508  		if resultVar1 == nil {
  2509  			success = "true"
  2510  		}
  2511  		s.Root.Metrics.ObserveStoreMethodDuration("ComplianceStore.Update", success, elapsed)
  2512  	}
  2513  	return resultVar0, resultVar1
  2514  }
  2515  
  2516  func (s *TimerLayerEmojiStore) Delete(emoji *model.Emoji, time int64) error {
  2517  	start := timemodule.Now()
  2518  
  2519  	resultVar0 := s.EmojiStore.Delete(emoji, time)
  2520  
  2521  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2522  	if s.Root.Metrics != nil {
  2523  		success := "false"
  2524  		if resultVar0 == nil {
  2525  			success = "true"
  2526  		}
  2527  		s.Root.Metrics.ObserveStoreMethodDuration("EmojiStore.Delete", success, elapsed)
  2528  	}
  2529  	return resultVar0
  2530  }
  2531  
  2532  func (s *TimerLayerEmojiStore) Get(id string, allowFromCache bool) (*model.Emoji, error) {
  2533  	start := timemodule.Now()
  2534  
  2535  	resultVar0, resultVar1 := s.EmojiStore.Get(id, allowFromCache)
  2536  
  2537  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2538  	if s.Root.Metrics != nil {
  2539  		success := "false"
  2540  		if resultVar1 == nil {
  2541  			success = "true"
  2542  		}
  2543  		s.Root.Metrics.ObserveStoreMethodDuration("EmojiStore.Get", success, elapsed)
  2544  	}
  2545  	return resultVar0, resultVar1
  2546  }
  2547  
  2548  func (s *TimerLayerEmojiStore) GetByName(name string, allowFromCache bool) (*model.Emoji, error) {
  2549  	start := timemodule.Now()
  2550  
  2551  	resultVar0, resultVar1 := s.EmojiStore.GetByName(name, allowFromCache)
  2552  
  2553  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2554  	if s.Root.Metrics != nil {
  2555  		success := "false"
  2556  		if resultVar1 == nil {
  2557  			success = "true"
  2558  		}
  2559  		s.Root.Metrics.ObserveStoreMethodDuration("EmojiStore.GetByName", success, elapsed)
  2560  	}
  2561  	return resultVar0, resultVar1
  2562  }
  2563  
  2564  func (s *TimerLayerEmojiStore) GetList(offset int, limit int, sort string) ([]*model.Emoji, error) {
  2565  	start := timemodule.Now()
  2566  
  2567  	resultVar0, resultVar1 := s.EmojiStore.GetList(offset, limit, sort)
  2568  
  2569  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2570  	if s.Root.Metrics != nil {
  2571  		success := "false"
  2572  		if resultVar1 == nil {
  2573  			success = "true"
  2574  		}
  2575  		s.Root.Metrics.ObserveStoreMethodDuration("EmojiStore.GetList", success, elapsed)
  2576  	}
  2577  	return resultVar0, resultVar1
  2578  }
  2579  
  2580  func (s *TimerLayerEmojiStore) GetMultipleByName(names []string) ([]*model.Emoji, error) {
  2581  	start := timemodule.Now()
  2582  
  2583  	resultVar0, resultVar1 := s.EmojiStore.GetMultipleByName(names)
  2584  
  2585  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2586  	if s.Root.Metrics != nil {
  2587  		success := "false"
  2588  		if resultVar1 == nil {
  2589  			success = "true"
  2590  		}
  2591  		s.Root.Metrics.ObserveStoreMethodDuration("EmojiStore.GetMultipleByName", success, elapsed)
  2592  	}
  2593  	return resultVar0, resultVar1
  2594  }
  2595  
  2596  func (s *TimerLayerEmojiStore) Save(emoji *model.Emoji) (*model.Emoji, error) {
  2597  	start := timemodule.Now()
  2598  
  2599  	resultVar0, resultVar1 := s.EmojiStore.Save(emoji)
  2600  
  2601  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2602  	if s.Root.Metrics != nil {
  2603  		success := "false"
  2604  		if resultVar1 == nil {
  2605  			success = "true"
  2606  		}
  2607  		s.Root.Metrics.ObserveStoreMethodDuration("EmojiStore.Save", success, elapsed)
  2608  	}
  2609  	return resultVar0, resultVar1
  2610  }
  2611  
  2612  func (s *TimerLayerEmojiStore) Search(name string, prefixOnly bool, limit int) ([]*model.Emoji, error) {
  2613  	start := timemodule.Now()
  2614  
  2615  	resultVar0, resultVar1 := s.EmojiStore.Search(name, prefixOnly, limit)
  2616  
  2617  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2618  	if s.Root.Metrics != nil {
  2619  		success := "false"
  2620  		if resultVar1 == nil {
  2621  			success = "true"
  2622  		}
  2623  		s.Root.Metrics.ObserveStoreMethodDuration("EmojiStore.Search", success, elapsed)
  2624  	}
  2625  	return resultVar0, resultVar1
  2626  }
  2627  
  2628  func (s *TimerLayerFileInfoStore) AttachToPost(fileId string, postId string, creatorId string) *model.AppError {
  2629  	start := timemodule.Now()
  2630  
  2631  	resultVar0 := s.FileInfoStore.AttachToPost(fileId, postId, creatorId)
  2632  
  2633  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2634  	if s.Root.Metrics != nil {
  2635  		success := "false"
  2636  		if resultVar0 == nil {
  2637  			success = "true"
  2638  		}
  2639  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.AttachToPost", success, elapsed)
  2640  	}
  2641  	return resultVar0
  2642  }
  2643  
  2644  func (s *TimerLayerFileInfoStore) ClearCaches() {
  2645  	start := timemodule.Now()
  2646  
  2647  	s.FileInfoStore.ClearCaches()
  2648  
  2649  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2650  	if s.Root.Metrics != nil {
  2651  		success := "false"
  2652  		if true {
  2653  			success = "true"
  2654  		}
  2655  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.ClearCaches", success, elapsed)
  2656  	}
  2657  }
  2658  
  2659  func (s *TimerLayerFileInfoStore) DeleteForPost(postId string) (string, *model.AppError) {
  2660  	start := timemodule.Now()
  2661  
  2662  	resultVar0, resultVar1 := s.FileInfoStore.DeleteForPost(postId)
  2663  
  2664  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2665  	if s.Root.Metrics != nil {
  2666  		success := "false"
  2667  		if resultVar1 == nil {
  2668  			success = "true"
  2669  		}
  2670  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.DeleteForPost", success, elapsed)
  2671  	}
  2672  	return resultVar0, resultVar1
  2673  }
  2674  
  2675  func (s *TimerLayerFileInfoStore) Get(id string) (*model.FileInfo, *model.AppError) {
  2676  	start := timemodule.Now()
  2677  
  2678  	resultVar0, resultVar1 := s.FileInfoStore.Get(id)
  2679  
  2680  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2681  	if s.Root.Metrics != nil {
  2682  		success := "false"
  2683  		if resultVar1 == nil {
  2684  			success = "true"
  2685  		}
  2686  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.Get", success, elapsed)
  2687  	}
  2688  	return resultVar0, resultVar1
  2689  }
  2690  
  2691  func (s *TimerLayerFileInfoStore) GetByPath(path string) (*model.FileInfo, *model.AppError) {
  2692  	start := timemodule.Now()
  2693  
  2694  	resultVar0, resultVar1 := s.FileInfoStore.GetByPath(path)
  2695  
  2696  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2697  	if s.Root.Metrics != nil {
  2698  		success := "false"
  2699  		if resultVar1 == nil {
  2700  			success = "true"
  2701  		}
  2702  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.GetByPath", success, elapsed)
  2703  	}
  2704  	return resultVar0, resultVar1
  2705  }
  2706  
  2707  func (s *TimerLayerFileInfoStore) GetForPost(postId string, readFromMaster bool, includeDeleted bool, allowFromCache bool) ([]*model.FileInfo, *model.AppError) {
  2708  	start := timemodule.Now()
  2709  
  2710  	resultVar0, resultVar1 := s.FileInfoStore.GetForPost(postId, readFromMaster, includeDeleted, allowFromCache)
  2711  
  2712  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2713  	if s.Root.Metrics != nil {
  2714  		success := "false"
  2715  		if resultVar1 == nil {
  2716  			success = "true"
  2717  		}
  2718  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.GetForPost", success, elapsed)
  2719  	}
  2720  	return resultVar0, resultVar1
  2721  }
  2722  
  2723  func (s *TimerLayerFileInfoStore) GetForUser(userId string) ([]*model.FileInfo, *model.AppError) {
  2724  	start := timemodule.Now()
  2725  
  2726  	resultVar0, resultVar1 := s.FileInfoStore.GetForUser(userId)
  2727  
  2728  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2729  	if s.Root.Metrics != nil {
  2730  		success := "false"
  2731  		if resultVar1 == nil {
  2732  			success = "true"
  2733  		}
  2734  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.GetForUser", success, elapsed)
  2735  	}
  2736  	return resultVar0, resultVar1
  2737  }
  2738  
  2739  func (s *TimerLayerFileInfoStore) GetWithOptions(page int, perPage int, opt *model.GetFileInfosOptions) ([]*model.FileInfo, *model.AppError) {
  2740  	start := timemodule.Now()
  2741  
  2742  	resultVar0, resultVar1 := s.FileInfoStore.GetWithOptions(page, perPage, opt)
  2743  
  2744  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2745  	if s.Root.Metrics != nil {
  2746  		success := "false"
  2747  		if resultVar1 == nil {
  2748  			success = "true"
  2749  		}
  2750  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.GetWithOptions", success, elapsed)
  2751  	}
  2752  	return resultVar0, resultVar1
  2753  }
  2754  
  2755  func (s *TimerLayerFileInfoStore) InvalidateFileInfosForPostCache(postId string, deleted bool) {
  2756  	start := timemodule.Now()
  2757  
  2758  	s.FileInfoStore.InvalidateFileInfosForPostCache(postId, deleted)
  2759  
  2760  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2761  	if s.Root.Metrics != nil {
  2762  		success := "false"
  2763  		if true {
  2764  			success = "true"
  2765  		}
  2766  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.InvalidateFileInfosForPostCache", success, elapsed)
  2767  	}
  2768  }
  2769  
  2770  func (s *TimerLayerFileInfoStore) PermanentDelete(fileId string) *model.AppError {
  2771  	start := timemodule.Now()
  2772  
  2773  	resultVar0 := s.FileInfoStore.PermanentDelete(fileId)
  2774  
  2775  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2776  	if s.Root.Metrics != nil {
  2777  		success := "false"
  2778  		if resultVar0 == nil {
  2779  			success = "true"
  2780  		}
  2781  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.PermanentDelete", success, elapsed)
  2782  	}
  2783  	return resultVar0
  2784  }
  2785  
  2786  func (s *TimerLayerFileInfoStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) {
  2787  	start := timemodule.Now()
  2788  
  2789  	resultVar0, resultVar1 := s.FileInfoStore.PermanentDeleteBatch(endTime, limit)
  2790  
  2791  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2792  	if s.Root.Metrics != nil {
  2793  		success := "false"
  2794  		if resultVar1 == nil {
  2795  			success = "true"
  2796  		}
  2797  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.PermanentDeleteBatch", success, elapsed)
  2798  	}
  2799  	return resultVar0, resultVar1
  2800  }
  2801  
  2802  func (s *TimerLayerFileInfoStore) PermanentDeleteByUser(userId string) (int64, *model.AppError) {
  2803  	start := timemodule.Now()
  2804  
  2805  	resultVar0, resultVar1 := s.FileInfoStore.PermanentDeleteByUser(userId)
  2806  
  2807  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2808  	if s.Root.Metrics != nil {
  2809  		success := "false"
  2810  		if resultVar1 == nil {
  2811  			success = "true"
  2812  		}
  2813  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.PermanentDeleteByUser", success, elapsed)
  2814  	}
  2815  	return resultVar0, resultVar1
  2816  }
  2817  
  2818  func (s *TimerLayerFileInfoStore) Save(info *model.FileInfo) (*model.FileInfo, *model.AppError) {
  2819  	start := timemodule.Now()
  2820  
  2821  	resultVar0, resultVar1 := s.FileInfoStore.Save(info)
  2822  
  2823  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2824  	if s.Root.Metrics != nil {
  2825  		success := "false"
  2826  		if resultVar1 == nil {
  2827  			success = "true"
  2828  		}
  2829  		s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.Save", success, elapsed)
  2830  	}
  2831  	return resultVar0, resultVar1
  2832  }
  2833  
  2834  func (s *TimerLayerGroupStore) AdminRoleGroupsForSyncableMember(userID string, syncableID string, syncableType model.GroupSyncableType) ([]string, *model.AppError) {
  2835  	start := timemodule.Now()
  2836  
  2837  	resultVar0, resultVar1 := s.GroupStore.AdminRoleGroupsForSyncableMember(userID, syncableID, syncableType)
  2838  
  2839  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2840  	if s.Root.Metrics != nil {
  2841  		success := "false"
  2842  		if resultVar1 == nil {
  2843  			success = "true"
  2844  		}
  2845  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.AdminRoleGroupsForSyncableMember", success, elapsed)
  2846  	}
  2847  	return resultVar0, resultVar1
  2848  }
  2849  
  2850  func (s *TimerLayerGroupStore) ChannelMembersMinusGroupMembers(channelID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, *model.AppError) {
  2851  	start := timemodule.Now()
  2852  
  2853  	resultVar0, resultVar1 := s.GroupStore.ChannelMembersMinusGroupMembers(channelID, groupIDs, page, perPage)
  2854  
  2855  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2856  	if s.Root.Metrics != nil {
  2857  		success := "false"
  2858  		if resultVar1 == nil {
  2859  			success = "true"
  2860  		}
  2861  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.ChannelMembersMinusGroupMembers", success, elapsed)
  2862  	}
  2863  	return resultVar0, resultVar1
  2864  }
  2865  
  2866  func (s *TimerLayerGroupStore) ChannelMembersToAdd(since int64, channelID *string) ([]*model.UserChannelIDPair, *model.AppError) {
  2867  	start := timemodule.Now()
  2868  
  2869  	resultVar0, resultVar1 := s.GroupStore.ChannelMembersToAdd(since, channelID)
  2870  
  2871  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2872  	if s.Root.Metrics != nil {
  2873  		success := "false"
  2874  		if resultVar1 == nil {
  2875  			success = "true"
  2876  		}
  2877  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.ChannelMembersToAdd", success, elapsed)
  2878  	}
  2879  	return resultVar0, resultVar1
  2880  }
  2881  
  2882  func (s *TimerLayerGroupStore) ChannelMembersToRemove(channelID *string) ([]*model.ChannelMember, *model.AppError) {
  2883  	start := timemodule.Now()
  2884  
  2885  	resultVar0, resultVar1 := s.GroupStore.ChannelMembersToRemove(channelID)
  2886  
  2887  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2888  	if s.Root.Metrics != nil {
  2889  		success := "false"
  2890  		if resultVar1 == nil {
  2891  			success = "true"
  2892  		}
  2893  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.ChannelMembersToRemove", success, elapsed)
  2894  	}
  2895  	return resultVar0, resultVar1
  2896  }
  2897  
  2898  func (s *TimerLayerGroupStore) CountChannelMembersMinusGroupMembers(channelID string, groupIDs []string) (int64, *model.AppError) {
  2899  	start := timemodule.Now()
  2900  
  2901  	resultVar0, resultVar1 := s.GroupStore.CountChannelMembersMinusGroupMembers(channelID, groupIDs)
  2902  
  2903  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2904  	if s.Root.Metrics != nil {
  2905  		success := "false"
  2906  		if resultVar1 == nil {
  2907  			success = "true"
  2908  		}
  2909  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.CountChannelMembersMinusGroupMembers", success, elapsed)
  2910  	}
  2911  	return resultVar0, resultVar1
  2912  }
  2913  
  2914  func (s *TimerLayerGroupStore) CountGroupsByChannel(channelId string, opts model.GroupSearchOpts) (int64, *model.AppError) {
  2915  	start := timemodule.Now()
  2916  
  2917  	resultVar0, resultVar1 := s.GroupStore.CountGroupsByChannel(channelId, opts)
  2918  
  2919  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2920  	if s.Root.Metrics != nil {
  2921  		success := "false"
  2922  		if resultVar1 == nil {
  2923  			success = "true"
  2924  		}
  2925  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.CountGroupsByChannel", success, elapsed)
  2926  	}
  2927  	return resultVar0, resultVar1
  2928  }
  2929  
  2930  func (s *TimerLayerGroupStore) CountGroupsByTeam(teamId string, opts model.GroupSearchOpts) (int64, *model.AppError) {
  2931  	start := timemodule.Now()
  2932  
  2933  	resultVar0, resultVar1 := s.GroupStore.CountGroupsByTeam(teamId, opts)
  2934  
  2935  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2936  	if s.Root.Metrics != nil {
  2937  		success := "false"
  2938  		if resultVar1 == nil {
  2939  			success = "true"
  2940  		}
  2941  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.CountGroupsByTeam", success, elapsed)
  2942  	}
  2943  	return resultVar0, resultVar1
  2944  }
  2945  
  2946  func (s *TimerLayerGroupStore) CountTeamMembersMinusGroupMembers(teamID string, groupIDs []string) (int64, *model.AppError) {
  2947  	start := timemodule.Now()
  2948  
  2949  	resultVar0, resultVar1 := s.GroupStore.CountTeamMembersMinusGroupMembers(teamID, groupIDs)
  2950  
  2951  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2952  	if s.Root.Metrics != nil {
  2953  		success := "false"
  2954  		if resultVar1 == nil {
  2955  			success = "true"
  2956  		}
  2957  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.CountTeamMembersMinusGroupMembers", success, elapsed)
  2958  	}
  2959  	return resultVar0, resultVar1
  2960  }
  2961  
  2962  func (s *TimerLayerGroupStore) Create(group *model.Group) (*model.Group, *model.AppError) {
  2963  	start := timemodule.Now()
  2964  
  2965  	resultVar0, resultVar1 := s.GroupStore.Create(group)
  2966  
  2967  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2968  	if s.Root.Metrics != nil {
  2969  		success := "false"
  2970  		if resultVar1 == nil {
  2971  			success = "true"
  2972  		}
  2973  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.Create", success, elapsed)
  2974  	}
  2975  	return resultVar0, resultVar1
  2976  }
  2977  
  2978  func (s *TimerLayerGroupStore) CreateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) {
  2979  	start := timemodule.Now()
  2980  
  2981  	resultVar0, resultVar1 := s.GroupStore.CreateGroupSyncable(groupSyncable)
  2982  
  2983  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  2984  	if s.Root.Metrics != nil {
  2985  		success := "false"
  2986  		if resultVar1 == nil {
  2987  			success = "true"
  2988  		}
  2989  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.CreateGroupSyncable", success, elapsed)
  2990  	}
  2991  	return resultVar0, resultVar1
  2992  }
  2993  
  2994  func (s *TimerLayerGroupStore) Delete(groupID string) (*model.Group, *model.AppError) {
  2995  	start := timemodule.Now()
  2996  
  2997  	resultVar0, resultVar1 := s.GroupStore.Delete(groupID)
  2998  
  2999  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3000  	if s.Root.Metrics != nil {
  3001  		success := "false"
  3002  		if resultVar1 == nil {
  3003  			success = "true"
  3004  		}
  3005  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.Delete", success, elapsed)
  3006  	}
  3007  	return resultVar0, resultVar1
  3008  }
  3009  
  3010  func (s *TimerLayerGroupStore) DeleteGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) {
  3011  	start := timemodule.Now()
  3012  
  3013  	resultVar0, resultVar1 := s.GroupStore.DeleteGroupSyncable(groupID, syncableID, syncableType)
  3014  
  3015  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3016  	if s.Root.Metrics != nil {
  3017  		success := "false"
  3018  		if resultVar1 == nil {
  3019  			success = "true"
  3020  		}
  3021  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.DeleteGroupSyncable", success, elapsed)
  3022  	}
  3023  	return resultVar0, resultVar1
  3024  }
  3025  
  3026  func (s *TimerLayerGroupStore) DeleteMember(groupID string, userID string) (*model.GroupMember, *model.AppError) {
  3027  	start := timemodule.Now()
  3028  
  3029  	resultVar0, resultVar1 := s.GroupStore.DeleteMember(groupID, userID)
  3030  
  3031  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3032  	if s.Root.Metrics != nil {
  3033  		success := "false"
  3034  		if resultVar1 == nil {
  3035  			success = "true"
  3036  		}
  3037  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.DeleteMember", success, elapsed)
  3038  	}
  3039  	return resultVar0, resultVar1
  3040  }
  3041  
  3042  func (s *TimerLayerGroupStore) DistinctGroupMemberCount() (int64, *model.AppError) {
  3043  	start := timemodule.Now()
  3044  
  3045  	resultVar0, resultVar1 := s.GroupStore.DistinctGroupMemberCount()
  3046  
  3047  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3048  	if s.Root.Metrics != nil {
  3049  		success := "false"
  3050  		if resultVar1 == nil {
  3051  			success = "true"
  3052  		}
  3053  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.DistinctGroupMemberCount", success, elapsed)
  3054  	}
  3055  	return resultVar0, resultVar1
  3056  }
  3057  
  3058  func (s *TimerLayerGroupStore) Get(groupID string) (*model.Group, *model.AppError) {
  3059  	start := timemodule.Now()
  3060  
  3061  	resultVar0, resultVar1 := s.GroupStore.Get(groupID)
  3062  
  3063  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3064  	if s.Root.Metrics != nil {
  3065  		success := "false"
  3066  		if resultVar1 == nil {
  3067  			success = "true"
  3068  		}
  3069  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.Get", success, elapsed)
  3070  	}
  3071  	return resultVar0, resultVar1
  3072  }
  3073  
  3074  func (s *TimerLayerGroupStore) GetAllBySource(groupSource model.GroupSource) ([]*model.Group, *model.AppError) {
  3075  	start := timemodule.Now()
  3076  
  3077  	resultVar0, resultVar1 := s.GroupStore.GetAllBySource(groupSource)
  3078  
  3079  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3080  	if s.Root.Metrics != nil {
  3081  		success := "false"
  3082  		if resultVar1 == nil {
  3083  			success = "true"
  3084  		}
  3085  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetAllBySource", success, elapsed)
  3086  	}
  3087  	return resultVar0, resultVar1
  3088  }
  3089  
  3090  func (s *TimerLayerGroupStore) GetAllGroupSyncablesByGroupId(groupID string, syncableType model.GroupSyncableType) ([]*model.GroupSyncable, *model.AppError) {
  3091  	start := timemodule.Now()
  3092  
  3093  	resultVar0, resultVar1 := s.GroupStore.GetAllGroupSyncablesByGroupId(groupID, syncableType)
  3094  
  3095  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3096  	if s.Root.Metrics != nil {
  3097  		success := "false"
  3098  		if resultVar1 == nil {
  3099  			success = "true"
  3100  		}
  3101  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetAllGroupSyncablesByGroupId", success, elapsed)
  3102  	}
  3103  	return resultVar0, resultVar1
  3104  }
  3105  
  3106  func (s *TimerLayerGroupStore) GetByIDs(groupIDs []string) ([]*model.Group, *model.AppError) {
  3107  	start := timemodule.Now()
  3108  
  3109  	resultVar0, resultVar1 := s.GroupStore.GetByIDs(groupIDs)
  3110  
  3111  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3112  	if s.Root.Metrics != nil {
  3113  		success := "false"
  3114  		if resultVar1 == nil {
  3115  			success = "true"
  3116  		}
  3117  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetByIDs", success, elapsed)
  3118  	}
  3119  	return resultVar0, resultVar1
  3120  }
  3121  
  3122  func (s *TimerLayerGroupStore) GetByName(name string, opts model.GroupSearchOpts) (*model.Group, *model.AppError) {
  3123  	start := timemodule.Now()
  3124  
  3125  	resultVar0, resultVar1 := s.GroupStore.GetByName(name, opts)
  3126  
  3127  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3128  	if s.Root.Metrics != nil {
  3129  		success := "false"
  3130  		if resultVar1 == nil {
  3131  			success = "true"
  3132  		}
  3133  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetByName", success, elapsed)
  3134  	}
  3135  	return resultVar0, resultVar1
  3136  }
  3137  
  3138  func (s *TimerLayerGroupStore) GetByRemoteID(remoteID string, groupSource model.GroupSource) (*model.Group, *model.AppError) {
  3139  	start := timemodule.Now()
  3140  
  3141  	resultVar0, resultVar1 := s.GroupStore.GetByRemoteID(remoteID, groupSource)
  3142  
  3143  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3144  	if s.Root.Metrics != nil {
  3145  		success := "false"
  3146  		if resultVar1 == nil {
  3147  			success = "true"
  3148  		}
  3149  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetByRemoteID", success, elapsed)
  3150  	}
  3151  	return resultVar0, resultVar1
  3152  }
  3153  
  3154  func (s *TimerLayerGroupStore) GetByUser(userId string) ([]*model.Group, *model.AppError) {
  3155  	start := timemodule.Now()
  3156  
  3157  	resultVar0, resultVar1 := s.GroupStore.GetByUser(userId)
  3158  
  3159  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3160  	if s.Root.Metrics != nil {
  3161  		success := "false"
  3162  		if resultVar1 == nil {
  3163  			success = "true"
  3164  		}
  3165  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetByUser", success, elapsed)
  3166  	}
  3167  	return resultVar0, resultVar1
  3168  }
  3169  
  3170  func (s *TimerLayerGroupStore) GetGroupSyncable(groupID string, syncableID string, syncableType model.GroupSyncableType) (*model.GroupSyncable, *model.AppError) {
  3171  	start := timemodule.Now()
  3172  
  3173  	resultVar0, resultVar1 := s.GroupStore.GetGroupSyncable(groupID, syncableID, syncableType)
  3174  
  3175  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3176  	if s.Root.Metrics != nil {
  3177  		success := "false"
  3178  		if resultVar1 == nil {
  3179  			success = "true"
  3180  		}
  3181  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetGroupSyncable", success, elapsed)
  3182  	}
  3183  	return resultVar0, resultVar1
  3184  }
  3185  
  3186  func (s *TimerLayerGroupStore) GetGroups(page int, perPage int, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError) {
  3187  	start := timemodule.Now()
  3188  
  3189  	resultVar0, resultVar1 := s.GroupStore.GetGroups(page, perPage, opts)
  3190  
  3191  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3192  	if s.Root.Metrics != nil {
  3193  		success := "false"
  3194  		if resultVar1 == nil {
  3195  			success = "true"
  3196  		}
  3197  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetGroups", success, elapsed)
  3198  	}
  3199  	return resultVar0, resultVar1
  3200  }
  3201  
  3202  func (s *TimerLayerGroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, *model.AppError) {
  3203  	start := timemodule.Now()
  3204  
  3205  	resultVar0, resultVar1 := s.GroupStore.GetGroupsAssociatedToChannelsByTeam(teamId, opts)
  3206  
  3207  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3208  	if s.Root.Metrics != nil {
  3209  		success := "false"
  3210  		if resultVar1 == nil {
  3211  			success = "true"
  3212  		}
  3213  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetGroupsAssociatedToChannelsByTeam", success, elapsed)
  3214  	}
  3215  	return resultVar0, resultVar1
  3216  }
  3217  
  3218  func (s *TimerLayerGroupStore) GetGroupsByChannel(channelId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError) {
  3219  	start := timemodule.Now()
  3220  
  3221  	resultVar0, resultVar1 := s.GroupStore.GetGroupsByChannel(channelId, opts)
  3222  
  3223  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3224  	if s.Root.Metrics != nil {
  3225  		success := "false"
  3226  		if resultVar1 == nil {
  3227  			success = "true"
  3228  		}
  3229  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetGroupsByChannel", success, elapsed)
  3230  	}
  3231  	return resultVar0, resultVar1
  3232  }
  3233  
  3234  func (s *TimerLayerGroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError) {
  3235  	start := timemodule.Now()
  3236  
  3237  	resultVar0, resultVar1 := s.GroupStore.GetGroupsByTeam(teamId, opts)
  3238  
  3239  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3240  	if s.Root.Metrics != nil {
  3241  		success := "false"
  3242  		if resultVar1 == nil {
  3243  			success = "true"
  3244  		}
  3245  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetGroupsByTeam", success, elapsed)
  3246  	}
  3247  	return resultVar0, resultVar1
  3248  }
  3249  
  3250  func (s *TimerLayerGroupStore) GetMemberCount(groupID string) (int64, *model.AppError) {
  3251  	start := timemodule.Now()
  3252  
  3253  	resultVar0, resultVar1 := s.GroupStore.GetMemberCount(groupID)
  3254  
  3255  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3256  	if s.Root.Metrics != nil {
  3257  		success := "false"
  3258  		if resultVar1 == nil {
  3259  			success = "true"
  3260  		}
  3261  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetMemberCount", success, elapsed)
  3262  	}
  3263  	return resultVar0, resultVar1
  3264  }
  3265  
  3266  func (s *TimerLayerGroupStore) GetMemberUsers(groupID string) ([]*model.User, *model.AppError) {
  3267  	start := timemodule.Now()
  3268  
  3269  	resultVar0, resultVar1 := s.GroupStore.GetMemberUsers(groupID)
  3270  
  3271  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3272  	if s.Root.Metrics != nil {
  3273  		success := "false"
  3274  		if resultVar1 == nil {
  3275  			success = "true"
  3276  		}
  3277  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetMemberUsers", success, elapsed)
  3278  	}
  3279  	return resultVar0, resultVar1
  3280  }
  3281  
  3282  func (s *TimerLayerGroupStore) GetMemberUsersInTeam(groupID string, teamID string) ([]*model.User, *model.AppError) {
  3283  	start := timemodule.Now()
  3284  
  3285  	resultVar0, resultVar1 := s.GroupStore.GetMemberUsersInTeam(groupID, teamID)
  3286  
  3287  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3288  	if s.Root.Metrics != nil {
  3289  		success := "false"
  3290  		if resultVar1 == nil {
  3291  			success = "true"
  3292  		}
  3293  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetMemberUsersInTeam", success, elapsed)
  3294  	}
  3295  	return resultVar0, resultVar1
  3296  }
  3297  
  3298  func (s *TimerLayerGroupStore) GetMemberUsersNotInChannel(groupID string, channelID string) ([]*model.User, *model.AppError) {
  3299  	start := timemodule.Now()
  3300  
  3301  	resultVar0, resultVar1 := s.GroupStore.GetMemberUsersNotInChannel(groupID, channelID)
  3302  
  3303  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3304  	if s.Root.Metrics != nil {
  3305  		success := "false"
  3306  		if resultVar1 == nil {
  3307  			success = "true"
  3308  		}
  3309  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetMemberUsersNotInChannel", success, elapsed)
  3310  	}
  3311  	return resultVar0, resultVar1
  3312  }
  3313  
  3314  func (s *TimerLayerGroupStore) GetMemberUsersPage(groupID string, page int, perPage int) ([]*model.User, *model.AppError) {
  3315  	start := timemodule.Now()
  3316  
  3317  	resultVar0, resultVar1 := s.GroupStore.GetMemberUsersPage(groupID, page, perPage)
  3318  
  3319  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3320  	if s.Root.Metrics != nil {
  3321  		success := "false"
  3322  		if resultVar1 == nil {
  3323  			success = "true"
  3324  		}
  3325  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetMemberUsersPage", success, elapsed)
  3326  	}
  3327  	return resultVar0, resultVar1
  3328  }
  3329  
  3330  func (s *TimerLayerGroupStore) GroupChannelCount() (int64, *model.AppError) {
  3331  	start := timemodule.Now()
  3332  
  3333  	resultVar0, resultVar1 := s.GroupStore.GroupChannelCount()
  3334  
  3335  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3336  	if s.Root.Metrics != nil {
  3337  		success := "false"
  3338  		if resultVar1 == nil {
  3339  			success = "true"
  3340  		}
  3341  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GroupChannelCount", success, elapsed)
  3342  	}
  3343  	return resultVar0, resultVar1
  3344  }
  3345  
  3346  func (s *TimerLayerGroupStore) GroupCount() (int64, *model.AppError) {
  3347  	start := timemodule.Now()
  3348  
  3349  	resultVar0, resultVar1 := s.GroupStore.GroupCount()
  3350  
  3351  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3352  	if s.Root.Metrics != nil {
  3353  		success := "false"
  3354  		if resultVar1 == nil {
  3355  			success = "true"
  3356  		}
  3357  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GroupCount", success, elapsed)
  3358  	}
  3359  	return resultVar0, resultVar1
  3360  }
  3361  
  3362  func (s *TimerLayerGroupStore) GroupCountWithAllowReference() (int64, *model.AppError) {
  3363  	start := timemodule.Now()
  3364  
  3365  	resultVar0, resultVar1 := s.GroupStore.GroupCountWithAllowReference()
  3366  
  3367  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3368  	if s.Root.Metrics != nil {
  3369  		success := "false"
  3370  		if resultVar1 == nil {
  3371  			success = "true"
  3372  		}
  3373  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GroupCountWithAllowReference", success, elapsed)
  3374  	}
  3375  	return resultVar0, resultVar1
  3376  }
  3377  
  3378  func (s *TimerLayerGroupStore) GroupMemberCount() (int64, *model.AppError) {
  3379  	start := timemodule.Now()
  3380  
  3381  	resultVar0, resultVar1 := s.GroupStore.GroupMemberCount()
  3382  
  3383  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3384  	if s.Root.Metrics != nil {
  3385  		success := "false"
  3386  		if resultVar1 == nil {
  3387  			success = "true"
  3388  		}
  3389  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GroupMemberCount", success, elapsed)
  3390  	}
  3391  	return resultVar0, resultVar1
  3392  }
  3393  
  3394  func (s *TimerLayerGroupStore) GroupTeamCount() (int64, *model.AppError) {
  3395  	start := timemodule.Now()
  3396  
  3397  	resultVar0, resultVar1 := s.GroupStore.GroupTeamCount()
  3398  
  3399  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3400  	if s.Root.Metrics != nil {
  3401  		success := "false"
  3402  		if resultVar1 == nil {
  3403  			success = "true"
  3404  		}
  3405  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GroupTeamCount", success, elapsed)
  3406  	}
  3407  	return resultVar0, resultVar1
  3408  }
  3409  
  3410  func (s *TimerLayerGroupStore) PermanentDeleteMembersByUser(userId string) *model.AppError {
  3411  	start := timemodule.Now()
  3412  
  3413  	resultVar0 := s.GroupStore.PermanentDeleteMembersByUser(userId)
  3414  
  3415  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3416  	if s.Root.Metrics != nil {
  3417  		success := "false"
  3418  		if resultVar0 == nil {
  3419  			success = "true"
  3420  		}
  3421  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.PermanentDeleteMembersByUser", success, elapsed)
  3422  	}
  3423  	return resultVar0
  3424  }
  3425  
  3426  func (s *TimerLayerGroupStore) PermittedSyncableAdmins(syncableID string, syncableType model.GroupSyncableType) ([]string, *model.AppError) {
  3427  	start := timemodule.Now()
  3428  
  3429  	resultVar0, resultVar1 := s.GroupStore.PermittedSyncableAdmins(syncableID, syncableType)
  3430  
  3431  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3432  	if s.Root.Metrics != nil {
  3433  		success := "false"
  3434  		if resultVar1 == nil {
  3435  			success = "true"
  3436  		}
  3437  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.PermittedSyncableAdmins", success, elapsed)
  3438  	}
  3439  	return resultVar0, resultVar1
  3440  }
  3441  
  3442  func (s *TimerLayerGroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, *model.AppError) {
  3443  	start := timemodule.Now()
  3444  
  3445  	resultVar0, resultVar1 := s.GroupStore.TeamMembersMinusGroupMembers(teamID, groupIDs, page, perPage)
  3446  
  3447  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3448  	if s.Root.Metrics != nil {
  3449  		success := "false"
  3450  		if resultVar1 == nil {
  3451  			success = "true"
  3452  		}
  3453  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.TeamMembersMinusGroupMembers", success, elapsed)
  3454  	}
  3455  	return resultVar0, resultVar1
  3456  }
  3457  
  3458  func (s *TimerLayerGroupStore) TeamMembersToAdd(since int64, teamID *string) ([]*model.UserTeamIDPair, *model.AppError) {
  3459  	start := timemodule.Now()
  3460  
  3461  	resultVar0, resultVar1 := s.GroupStore.TeamMembersToAdd(since, teamID)
  3462  
  3463  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3464  	if s.Root.Metrics != nil {
  3465  		success := "false"
  3466  		if resultVar1 == nil {
  3467  			success = "true"
  3468  		}
  3469  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.TeamMembersToAdd", success, elapsed)
  3470  	}
  3471  	return resultVar0, resultVar1
  3472  }
  3473  
  3474  func (s *TimerLayerGroupStore) TeamMembersToRemove(teamID *string) ([]*model.TeamMember, *model.AppError) {
  3475  	start := timemodule.Now()
  3476  
  3477  	resultVar0, resultVar1 := s.GroupStore.TeamMembersToRemove(teamID)
  3478  
  3479  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3480  	if s.Root.Metrics != nil {
  3481  		success := "false"
  3482  		if resultVar1 == nil {
  3483  			success = "true"
  3484  		}
  3485  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.TeamMembersToRemove", success, elapsed)
  3486  	}
  3487  	return resultVar0, resultVar1
  3488  }
  3489  
  3490  func (s *TimerLayerGroupStore) Update(group *model.Group) (*model.Group, *model.AppError) {
  3491  	start := timemodule.Now()
  3492  
  3493  	resultVar0, resultVar1 := s.GroupStore.Update(group)
  3494  
  3495  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3496  	if s.Root.Metrics != nil {
  3497  		success := "false"
  3498  		if resultVar1 == nil {
  3499  			success = "true"
  3500  		}
  3501  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.Update", success, elapsed)
  3502  	}
  3503  	return resultVar0, resultVar1
  3504  }
  3505  
  3506  func (s *TimerLayerGroupStore) UpdateGroupSyncable(groupSyncable *model.GroupSyncable) (*model.GroupSyncable, *model.AppError) {
  3507  	start := timemodule.Now()
  3508  
  3509  	resultVar0, resultVar1 := s.GroupStore.UpdateGroupSyncable(groupSyncable)
  3510  
  3511  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3512  	if s.Root.Metrics != nil {
  3513  		success := "false"
  3514  		if resultVar1 == nil {
  3515  			success = "true"
  3516  		}
  3517  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.UpdateGroupSyncable", success, elapsed)
  3518  	}
  3519  	return resultVar0, resultVar1
  3520  }
  3521  
  3522  func (s *TimerLayerGroupStore) UpsertMember(groupID string, userID string) (*model.GroupMember, *model.AppError) {
  3523  	start := timemodule.Now()
  3524  
  3525  	resultVar0, resultVar1 := s.GroupStore.UpsertMember(groupID, userID)
  3526  
  3527  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3528  	if s.Root.Metrics != nil {
  3529  		success := "false"
  3530  		if resultVar1 == nil {
  3531  			success = "true"
  3532  		}
  3533  		s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.UpsertMember", success, elapsed)
  3534  	}
  3535  	return resultVar0, resultVar1
  3536  }
  3537  
  3538  func (s *TimerLayerJobStore) Delete(id string) (string, *model.AppError) {
  3539  	start := timemodule.Now()
  3540  
  3541  	resultVar0, resultVar1 := s.JobStore.Delete(id)
  3542  
  3543  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3544  	if s.Root.Metrics != nil {
  3545  		success := "false"
  3546  		if resultVar1 == nil {
  3547  			success = "true"
  3548  		}
  3549  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.Delete", success, elapsed)
  3550  	}
  3551  	return resultVar0, resultVar1
  3552  }
  3553  
  3554  func (s *TimerLayerJobStore) Get(id string) (*model.Job, *model.AppError) {
  3555  	start := timemodule.Now()
  3556  
  3557  	resultVar0, resultVar1 := s.JobStore.Get(id)
  3558  
  3559  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3560  	if s.Root.Metrics != nil {
  3561  		success := "false"
  3562  		if resultVar1 == nil {
  3563  			success = "true"
  3564  		}
  3565  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.Get", success, elapsed)
  3566  	}
  3567  	return resultVar0, resultVar1
  3568  }
  3569  
  3570  func (s *TimerLayerJobStore) GetAllByStatus(status string) ([]*model.Job, *model.AppError) {
  3571  	start := timemodule.Now()
  3572  
  3573  	resultVar0, resultVar1 := s.JobStore.GetAllByStatus(status)
  3574  
  3575  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3576  	if s.Root.Metrics != nil {
  3577  		success := "false"
  3578  		if resultVar1 == nil {
  3579  			success = "true"
  3580  		}
  3581  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.GetAllByStatus", success, elapsed)
  3582  	}
  3583  	return resultVar0, resultVar1
  3584  }
  3585  
  3586  func (s *TimerLayerJobStore) GetAllByType(jobType string) ([]*model.Job, *model.AppError) {
  3587  	start := timemodule.Now()
  3588  
  3589  	resultVar0, resultVar1 := s.JobStore.GetAllByType(jobType)
  3590  
  3591  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3592  	if s.Root.Metrics != nil {
  3593  		success := "false"
  3594  		if resultVar1 == nil {
  3595  			success = "true"
  3596  		}
  3597  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.GetAllByType", success, elapsed)
  3598  	}
  3599  	return resultVar0, resultVar1
  3600  }
  3601  
  3602  func (s *TimerLayerJobStore) GetAllByTypePage(jobType string, offset int, limit int) ([]*model.Job, *model.AppError) {
  3603  	start := timemodule.Now()
  3604  
  3605  	resultVar0, resultVar1 := s.JobStore.GetAllByTypePage(jobType, offset, limit)
  3606  
  3607  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3608  	if s.Root.Metrics != nil {
  3609  		success := "false"
  3610  		if resultVar1 == nil {
  3611  			success = "true"
  3612  		}
  3613  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.GetAllByTypePage", success, elapsed)
  3614  	}
  3615  	return resultVar0, resultVar1
  3616  }
  3617  
  3618  func (s *TimerLayerJobStore) GetAllPage(offset int, limit int) ([]*model.Job, *model.AppError) {
  3619  	start := timemodule.Now()
  3620  
  3621  	resultVar0, resultVar1 := s.JobStore.GetAllPage(offset, limit)
  3622  
  3623  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3624  	if s.Root.Metrics != nil {
  3625  		success := "false"
  3626  		if resultVar1 == nil {
  3627  			success = "true"
  3628  		}
  3629  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.GetAllPage", success, elapsed)
  3630  	}
  3631  	return resultVar0, resultVar1
  3632  }
  3633  
  3634  func (s *TimerLayerJobStore) GetCountByStatusAndType(status string, jobType string) (int64, *model.AppError) {
  3635  	start := timemodule.Now()
  3636  
  3637  	resultVar0, resultVar1 := s.JobStore.GetCountByStatusAndType(status, jobType)
  3638  
  3639  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3640  	if s.Root.Metrics != nil {
  3641  		success := "false"
  3642  		if resultVar1 == nil {
  3643  			success = "true"
  3644  		}
  3645  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.GetCountByStatusAndType", success, elapsed)
  3646  	}
  3647  	return resultVar0, resultVar1
  3648  }
  3649  
  3650  func (s *TimerLayerJobStore) GetNewestJobByStatusAndType(status string, jobType string) (*model.Job, *model.AppError) {
  3651  	start := timemodule.Now()
  3652  
  3653  	resultVar0, resultVar1 := s.JobStore.GetNewestJobByStatusAndType(status, jobType)
  3654  
  3655  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3656  	if s.Root.Metrics != nil {
  3657  		success := "false"
  3658  		if resultVar1 == nil {
  3659  			success = "true"
  3660  		}
  3661  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.GetNewestJobByStatusAndType", success, elapsed)
  3662  	}
  3663  	return resultVar0, resultVar1
  3664  }
  3665  
  3666  func (s *TimerLayerJobStore) Save(job *model.Job) (*model.Job, *model.AppError) {
  3667  	start := timemodule.Now()
  3668  
  3669  	resultVar0, resultVar1 := s.JobStore.Save(job)
  3670  
  3671  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3672  	if s.Root.Metrics != nil {
  3673  		success := "false"
  3674  		if resultVar1 == nil {
  3675  			success = "true"
  3676  		}
  3677  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.Save", success, elapsed)
  3678  	}
  3679  	return resultVar0, resultVar1
  3680  }
  3681  
  3682  func (s *TimerLayerJobStore) UpdateOptimistically(job *model.Job, currentStatus string) (bool, *model.AppError) {
  3683  	start := timemodule.Now()
  3684  
  3685  	resultVar0, resultVar1 := s.JobStore.UpdateOptimistically(job, currentStatus)
  3686  
  3687  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3688  	if s.Root.Metrics != nil {
  3689  		success := "false"
  3690  		if resultVar1 == nil {
  3691  			success = "true"
  3692  		}
  3693  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.UpdateOptimistically", success, elapsed)
  3694  	}
  3695  	return resultVar0, resultVar1
  3696  }
  3697  
  3698  func (s *TimerLayerJobStore) UpdateStatus(id string, status string) (*model.Job, *model.AppError) {
  3699  	start := timemodule.Now()
  3700  
  3701  	resultVar0, resultVar1 := s.JobStore.UpdateStatus(id, status)
  3702  
  3703  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3704  	if s.Root.Metrics != nil {
  3705  		success := "false"
  3706  		if resultVar1 == nil {
  3707  			success = "true"
  3708  		}
  3709  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.UpdateStatus", success, elapsed)
  3710  	}
  3711  	return resultVar0, resultVar1
  3712  }
  3713  
  3714  func (s *TimerLayerJobStore) UpdateStatusOptimistically(id string, currentStatus string, newStatus string) (bool, *model.AppError) {
  3715  	start := timemodule.Now()
  3716  
  3717  	resultVar0, resultVar1 := s.JobStore.UpdateStatusOptimistically(id, currentStatus, newStatus)
  3718  
  3719  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3720  	if s.Root.Metrics != nil {
  3721  		success := "false"
  3722  		if resultVar1 == nil {
  3723  			success = "true"
  3724  		}
  3725  		s.Root.Metrics.ObserveStoreMethodDuration("JobStore.UpdateStatusOptimistically", success, elapsed)
  3726  	}
  3727  	return resultVar0, resultVar1
  3728  }
  3729  
  3730  func (s *TimerLayerLicenseStore) Get(id string) (*model.LicenseRecord, error) {
  3731  	start := timemodule.Now()
  3732  
  3733  	resultVar0, resultVar1 := s.LicenseStore.Get(id)
  3734  
  3735  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3736  	if s.Root.Metrics != nil {
  3737  		success := "false"
  3738  		if resultVar1 == nil {
  3739  			success = "true"
  3740  		}
  3741  		s.Root.Metrics.ObserveStoreMethodDuration("LicenseStore.Get", success, elapsed)
  3742  	}
  3743  	return resultVar0, resultVar1
  3744  }
  3745  
  3746  func (s *TimerLayerLicenseStore) Save(license *model.LicenseRecord) (*model.LicenseRecord, error) {
  3747  	start := timemodule.Now()
  3748  
  3749  	resultVar0, resultVar1 := s.LicenseStore.Save(license)
  3750  
  3751  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3752  	if s.Root.Metrics != nil {
  3753  		success := "false"
  3754  		if resultVar1 == nil {
  3755  			success = "true"
  3756  		}
  3757  		s.Root.Metrics.ObserveStoreMethodDuration("LicenseStore.Save", success, elapsed)
  3758  	}
  3759  	return resultVar0, resultVar1
  3760  }
  3761  
  3762  func (s *TimerLayerLinkMetadataStore) Get(url string, timestamp int64) (*model.LinkMetadata, error) {
  3763  	start := timemodule.Now()
  3764  
  3765  	resultVar0, resultVar1 := s.LinkMetadataStore.Get(url, timestamp)
  3766  
  3767  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3768  	if s.Root.Metrics != nil {
  3769  		success := "false"
  3770  		if resultVar1 == nil {
  3771  			success = "true"
  3772  		}
  3773  		s.Root.Metrics.ObserveStoreMethodDuration("LinkMetadataStore.Get", success, elapsed)
  3774  	}
  3775  	return resultVar0, resultVar1
  3776  }
  3777  
  3778  func (s *TimerLayerLinkMetadataStore) Save(linkMetadata *model.LinkMetadata) (*model.LinkMetadata, error) {
  3779  	start := timemodule.Now()
  3780  
  3781  	resultVar0, resultVar1 := s.LinkMetadataStore.Save(linkMetadata)
  3782  
  3783  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3784  	if s.Root.Metrics != nil {
  3785  		success := "false"
  3786  		if resultVar1 == nil {
  3787  			success = "true"
  3788  		}
  3789  		s.Root.Metrics.ObserveStoreMethodDuration("LinkMetadataStore.Save", success, elapsed)
  3790  	}
  3791  	return resultVar0, resultVar1
  3792  }
  3793  
  3794  func (s *TimerLayerOAuthStore) DeleteApp(id string) error {
  3795  	start := timemodule.Now()
  3796  
  3797  	resultVar0 := s.OAuthStore.DeleteApp(id)
  3798  
  3799  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3800  	if s.Root.Metrics != nil {
  3801  		success := "false"
  3802  		if resultVar0 == nil {
  3803  			success = "true"
  3804  		}
  3805  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.DeleteApp", success, elapsed)
  3806  	}
  3807  	return resultVar0
  3808  }
  3809  
  3810  func (s *TimerLayerOAuthStore) GetAccessData(token string) (*model.AccessData, error) {
  3811  	start := timemodule.Now()
  3812  
  3813  	resultVar0, resultVar1 := s.OAuthStore.GetAccessData(token)
  3814  
  3815  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3816  	if s.Root.Metrics != nil {
  3817  		success := "false"
  3818  		if resultVar1 == nil {
  3819  			success = "true"
  3820  		}
  3821  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.GetAccessData", success, elapsed)
  3822  	}
  3823  	return resultVar0, resultVar1
  3824  }
  3825  
  3826  func (s *TimerLayerOAuthStore) GetAccessDataByRefreshToken(token string) (*model.AccessData, error) {
  3827  	start := timemodule.Now()
  3828  
  3829  	resultVar0, resultVar1 := s.OAuthStore.GetAccessDataByRefreshToken(token)
  3830  
  3831  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3832  	if s.Root.Metrics != nil {
  3833  		success := "false"
  3834  		if resultVar1 == nil {
  3835  			success = "true"
  3836  		}
  3837  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.GetAccessDataByRefreshToken", success, elapsed)
  3838  	}
  3839  	return resultVar0, resultVar1
  3840  }
  3841  
  3842  func (s *TimerLayerOAuthStore) GetAccessDataByUserForApp(userId string, clientId string) ([]*model.AccessData, error) {
  3843  	start := timemodule.Now()
  3844  
  3845  	resultVar0, resultVar1 := s.OAuthStore.GetAccessDataByUserForApp(userId, clientId)
  3846  
  3847  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3848  	if s.Root.Metrics != nil {
  3849  		success := "false"
  3850  		if resultVar1 == nil {
  3851  			success = "true"
  3852  		}
  3853  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.GetAccessDataByUserForApp", success, elapsed)
  3854  	}
  3855  	return resultVar0, resultVar1
  3856  }
  3857  
  3858  func (s *TimerLayerOAuthStore) GetApp(id string) (*model.OAuthApp, error) {
  3859  	start := timemodule.Now()
  3860  
  3861  	resultVar0, resultVar1 := s.OAuthStore.GetApp(id)
  3862  
  3863  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3864  	if s.Root.Metrics != nil {
  3865  		success := "false"
  3866  		if resultVar1 == nil {
  3867  			success = "true"
  3868  		}
  3869  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.GetApp", success, elapsed)
  3870  	}
  3871  	return resultVar0, resultVar1
  3872  }
  3873  
  3874  func (s *TimerLayerOAuthStore) GetAppByUser(userId string, offset int, limit int) ([]*model.OAuthApp, error) {
  3875  	start := timemodule.Now()
  3876  
  3877  	resultVar0, resultVar1 := s.OAuthStore.GetAppByUser(userId, offset, limit)
  3878  
  3879  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3880  	if s.Root.Metrics != nil {
  3881  		success := "false"
  3882  		if resultVar1 == nil {
  3883  			success = "true"
  3884  		}
  3885  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.GetAppByUser", success, elapsed)
  3886  	}
  3887  	return resultVar0, resultVar1
  3888  }
  3889  
  3890  func (s *TimerLayerOAuthStore) GetApps(offset int, limit int) ([]*model.OAuthApp, error) {
  3891  	start := timemodule.Now()
  3892  
  3893  	resultVar0, resultVar1 := s.OAuthStore.GetApps(offset, limit)
  3894  
  3895  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3896  	if s.Root.Metrics != nil {
  3897  		success := "false"
  3898  		if resultVar1 == nil {
  3899  			success = "true"
  3900  		}
  3901  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.GetApps", success, elapsed)
  3902  	}
  3903  	return resultVar0, resultVar1
  3904  }
  3905  
  3906  func (s *TimerLayerOAuthStore) GetAuthData(code string) (*model.AuthData, error) {
  3907  	start := timemodule.Now()
  3908  
  3909  	resultVar0, resultVar1 := s.OAuthStore.GetAuthData(code)
  3910  
  3911  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3912  	if s.Root.Metrics != nil {
  3913  		success := "false"
  3914  		if resultVar1 == nil {
  3915  			success = "true"
  3916  		}
  3917  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.GetAuthData", success, elapsed)
  3918  	}
  3919  	return resultVar0, resultVar1
  3920  }
  3921  
  3922  func (s *TimerLayerOAuthStore) GetAuthorizedApps(userId string, offset int, limit int) ([]*model.OAuthApp, error) {
  3923  	start := timemodule.Now()
  3924  
  3925  	resultVar0, resultVar1 := s.OAuthStore.GetAuthorizedApps(userId, offset, limit)
  3926  
  3927  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3928  	if s.Root.Metrics != nil {
  3929  		success := "false"
  3930  		if resultVar1 == nil {
  3931  			success = "true"
  3932  		}
  3933  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.GetAuthorizedApps", success, elapsed)
  3934  	}
  3935  	return resultVar0, resultVar1
  3936  }
  3937  
  3938  func (s *TimerLayerOAuthStore) GetPreviousAccessData(userId string, clientId string) (*model.AccessData, error) {
  3939  	start := timemodule.Now()
  3940  
  3941  	resultVar0, resultVar1 := s.OAuthStore.GetPreviousAccessData(userId, clientId)
  3942  
  3943  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3944  	if s.Root.Metrics != nil {
  3945  		success := "false"
  3946  		if resultVar1 == nil {
  3947  			success = "true"
  3948  		}
  3949  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.GetPreviousAccessData", success, elapsed)
  3950  	}
  3951  	return resultVar0, resultVar1
  3952  }
  3953  
  3954  func (s *TimerLayerOAuthStore) PermanentDeleteAuthDataByUser(userId string) error {
  3955  	start := timemodule.Now()
  3956  
  3957  	resultVar0 := s.OAuthStore.PermanentDeleteAuthDataByUser(userId)
  3958  
  3959  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3960  	if s.Root.Metrics != nil {
  3961  		success := "false"
  3962  		if resultVar0 == nil {
  3963  			success = "true"
  3964  		}
  3965  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.PermanentDeleteAuthDataByUser", success, elapsed)
  3966  	}
  3967  	return resultVar0
  3968  }
  3969  
  3970  func (s *TimerLayerOAuthStore) RemoveAccessData(token string) error {
  3971  	start := timemodule.Now()
  3972  
  3973  	resultVar0 := s.OAuthStore.RemoveAccessData(token)
  3974  
  3975  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3976  	if s.Root.Metrics != nil {
  3977  		success := "false"
  3978  		if resultVar0 == nil {
  3979  			success = "true"
  3980  		}
  3981  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.RemoveAccessData", success, elapsed)
  3982  	}
  3983  	return resultVar0
  3984  }
  3985  
  3986  func (s *TimerLayerOAuthStore) RemoveAllAccessData() error {
  3987  	start := timemodule.Now()
  3988  
  3989  	resultVar0 := s.OAuthStore.RemoveAllAccessData()
  3990  
  3991  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  3992  	if s.Root.Metrics != nil {
  3993  		success := "false"
  3994  		if resultVar0 == nil {
  3995  			success = "true"
  3996  		}
  3997  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.RemoveAllAccessData", success, elapsed)
  3998  	}
  3999  	return resultVar0
  4000  }
  4001  
  4002  func (s *TimerLayerOAuthStore) RemoveAuthData(code string) error {
  4003  	start := timemodule.Now()
  4004  
  4005  	resultVar0 := s.OAuthStore.RemoveAuthData(code)
  4006  
  4007  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4008  	if s.Root.Metrics != nil {
  4009  		success := "false"
  4010  		if resultVar0 == nil {
  4011  			success = "true"
  4012  		}
  4013  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.RemoveAuthData", success, elapsed)
  4014  	}
  4015  	return resultVar0
  4016  }
  4017  
  4018  func (s *TimerLayerOAuthStore) SaveAccessData(accessData *model.AccessData) (*model.AccessData, error) {
  4019  	start := timemodule.Now()
  4020  
  4021  	resultVar0, resultVar1 := s.OAuthStore.SaveAccessData(accessData)
  4022  
  4023  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4024  	if s.Root.Metrics != nil {
  4025  		success := "false"
  4026  		if resultVar1 == nil {
  4027  			success = "true"
  4028  		}
  4029  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.SaveAccessData", success, elapsed)
  4030  	}
  4031  	return resultVar0, resultVar1
  4032  }
  4033  
  4034  func (s *TimerLayerOAuthStore) SaveApp(app *model.OAuthApp) (*model.OAuthApp, error) {
  4035  	start := timemodule.Now()
  4036  
  4037  	resultVar0, resultVar1 := s.OAuthStore.SaveApp(app)
  4038  
  4039  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4040  	if s.Root.Metrics != nil {
  4041  		success := "false"
  4042  		if resultVar1 == nil {
  4043  			success = "true"
  4044  		}
  4045  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.SaveApp", success, elapsed)
  4046  	}
  4047  	return resultVar0, resultVar1
  4048  }
  4049  
  4050  func (s *TimerLayerOAuthStore) SaveAuthData(authData *model.AuthData) (*model.AuthData, error) {
  4051  	start := timemodule.Now()
  4052  
  4053  	resultVar0, resultVar1 := s.OAuthStore.SaveAuthData(authData)
  4054  
  4055  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4056  	if s.Root.Metrics != nil {
  4057  		success := "false"
  4058  		if resultVar1 == nil {
  4059  			success = "true"
  4060  		}
  4061  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.SaveAuthData", success, elapsed)
  4062  	}
  4063  	return resultVar0, resultVar1
  4064  }
  4065  
  4066  func (s *TimerLayerOAuthStore) UpdateAccessData(accessData *model.AccessData) (*model.AccessData, error) {
  4067  	start := timemodule.Now()
  4068  
  4069  	resultVar0, resultVar1 := s.OAuthStore.UpdateAccessData(accessData)
  4070  
  4071  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4072  	if s.Root.Metrics != nil {
  4073  		success := "false"
  4074  		if resultVar1 == nil {
  4075  			success = "true"
  4076  		}
  4077  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.UpdateAccessData", success, elapsed)
  4078  	}
  4079  	return resultVar0, resultVar1
  4080  }
  4081  
  4082  func (s *TimerLayerOAuthStore) UpdateApp(app *model.OAuthApp) (*model.OAuthApp, error) {
  4083  	start := timemodule.Now()
  4084  
  4085  	resultVar0, resultVar1 := s.OAuthStore.UpdateApp(app)
  4086  
  4087  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4088  	if s.Root.Metrics != nil {
  4089  		success := "false"
  4090  		if resultVar1 == nil {
  4091  			success = "true"
  4092  		}
  4093  		s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.UpdateApp", success, elapsed)
  4094  	}
  4095  	return resultVar0, resultVar1
  4096  }
  4097  
  4098  func (s *TimerLayerPluginStore) CompareAndDelete(keyVal *model.PluginKeyValue, oldValue []byte) (bool, *model.AppError) {
  4099  	start := timemodule.Now()
  4100  
  4101  	resultVar0, resultVar1 := s.PluginStore.CompareAndDelete(keyVal, oldValue)
  4102  
  4103  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4104  	if s.Root.Metrics != nil {
  4105  		success := "false"
  4106  		if resultVar1 == nil {
  4107  			success = "true"
  4108  		}
  4109  		s.Root.Metrics.ObserveStoreMethodDuration("PluginStore.CompareAndDelete", success, elapsed)
  4110  	}
  4111  	return resultVar0, resultVar1
  4112  }
  4113  
  4114  func (s *TimerLayerPluginStore) CompareAndSet(keyVal *model.PluginKeyValue, oldValue []byte) (bool, *model.AppError) {
  4115  	start := timemodule.Now()
  4116  
  4117  	resultVar0, resultVar1 := s.PluginStore.CompareAndSet(keyVal, oldValue)
  4118  
  4119  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4120  	if s.Root.Metrics != nil {
  4121  		success := "false"
  4122  		if resultVar1 == nil {
  4123  			success = "true"
  4124  		}
  4125  		s.Root.Metrics.ObserveStoreMethodDuration("PluginStore.CompareAndSet", success, elapsed)
  4126  	}
  4127  	return resultVar0, resultVar1
  4128  }
  4129  
  4130  func (s *TimerLayerPluginStore) Delete(pluginId string, key string) *model.AppError {
  4131  	start := timemodule.Now()
  4132  
  4133  	resultVar0 := s.PluginStore.Delete(pluginId, key)
  4134  
  4135  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4136  	if s.Root.Metrics != nil {
  4137  		success := "false"
  4138  		if resultVar0 == nil {
  4139  			success = "true"
  4140  		}
  4141  		s.Root.Metrics.ObserveStoreMethodDuration("PluginStore.Delete", success, elapsed)
  4142  	}
  4143  	return resultVar0
  4144  }
  4145  
  4146  func (s *TimerLayerPluginStore) DeleteAllExpired() *model.AppError {
  4147  	start := timemodule.Now()
  4148  
  4149  	resultVar0 := s.PluginStore.DeleteAllExpired()
  4150  
  4151  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4152  	if s.Root.Metrics != nil {
  4153  		success := "false"
  4154  		if resultVar0 == nil {
  4155  			success = "true"
  4156  		}
  4157  		s.Root.Metrics.ObserveStoreMethodDuration("PluginStore.DeleteAllExpired", success, elapsed)
  4158  	}
  4159  	return resultVar0
  4160  }
  4161  
  4162  func (s *TimerLayerPluginStore) DeleteAllForPlugin(PluginId string) *model.AppError {
  4163  	start := timemodule.Now()
  4164  
  4165  	resultVar0 := s.PluginStore.DeleteAllForPlugin(PluginId)
  4166  
  4167  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4168  	if s.Root.Metrics != nil {
  4169  		success := "false"
  4170  		if resultVar0 == nil {
  4171  			success = "true"
  4172  		}
  4173  		s.Root.Metrics.ObserveStoreMethodDuration("PluginStore.DeleteAllForPlugin", success, elapsed)
  4174  	}
  4175  	return resultVar0
  4176  }
  4177  
  4178  func (s *TimerLayerPluginStore) Get(pluginId string, key string) (*model.PluginKeyValue, *model.AppError) {
  4179  	start := timemodule.Now()
  4180  
  4181  	resultVar0, resultVar1 := s.PluginStore.Get(pluginId, key)
  4182  
  4183  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4184  	if s.Root.Metrics != nil {
  4185  		success := "false"
  4186  		if resultVar1 == nil {
  4187  			success = "true"
  4188  		}
  4189  		s.Root.Metrics.ObserveStoreMethodDuration("PluginStore.Get", success, elapsed)
  4190  	}
  4191  	return resultVar0, resultVar1
  4192  }
  4193  
  4194  func (s *TimerLayerPluginStore) List(pluginId string, page int, perPage int) ([]string, *model.AppError) {
  4195  	start := timemodule.Now()
  4196  
  4197  	resultVar0, resultVar1 := s.PluginStore.List(pluginId, page, perPage)
  4198  
  4199  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4200  	if s.Root.Metrics != nil {
  4201  		success := "false"
  4202  		if resultVar1 == nil {
  4203  			success = "true"
  4204  		}
  4205  		s.Root.Metrics.ObserveStoreMethodDuration("PluginStore.List", success, elapsed)
  4206  	}
  4207  	return resultVar0, resultVar1
  4208  }
  4209  
  4210  func (s *TimerLayerPluginStore) SaveOrUpdate(keyVal *model.PluginKeyValue) (*model.PluginKeyValue, *model.AppError) {
  4211  	start := timemodule.Now()
  4212  
  4213  	resultVar0, resultVar1 := s.PluginStore.SaveOrUpdate(keyVal)
  4214  
  4215  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4216  	if s.Root.Metrics != nil {
  4217  		success := "false"
  4218  		if resultVar1 == nil {
  4219  			success = "true"
  4220  		}
  4221  		s.Root.Metrics.ObserveStoreMethodDuration("PluginStore.SaveOrUpdate", success, elapsed)
  4222  	}
  4223  	return resultVar0, resultVar1
  4224  }
  4225  
  4226  func (s *TimerLayerPluginStore) SetWithOptions(pluginId string, key string, value []byte, options model.PluginKVSetOptions) (bool, *model.AppError) {
  4227  	start := timemodule.Now()
  4228  
  4229  	resultVar0, resultVar1 := s.PluginStore.SetWithOptions(pluginId, key, value, options)
  4230  
  4231  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4232  	if s.Root.Metrics != nil {
  4233  		success := "false"
  4234  		if resultVar1 == nil {
  4235  			success = "true"
  4236  		}
  4237  		s.Root.Metrics.ObserveStoreMethodDuration("PluginStore.SetWithOptions", success, elapsed)
  4238  	}
  4239  	return resultVar0, resultVar1
  4240  }
  4241  
  4242  func (s *TimerLayerPostStore) AnalyticsPostCount(teamId string, mustHaveFile bool, mustHaveHashtag bool) (int64, *model.AppError) {
  4243  	start := timemodule.Now()
  4244  
  4245  	resultVar0, resultVar1 := s.PostStore.AnalyticsPostCount(teamId, mustHaveFile, mustHaveHashtag)
  4246  
  4247  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4248  	if s.Root.Metrics != nil {
  4249  		success := "false"
  4250  		if resultVar1 == nil {
  4251  			success = "true"
  4252  		}
  4253  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.AnalyticsPostCount", success, elapsed)
  4254  	}
  4255  	return resultVar0, resultVar1
  4256  }
  4257  
  4258  func (s *TimerLayerPostStore) AnalyticsPostCountsByDay(options *model.AnalyticsPostCountsOptions) (model.AnalyticsRows, *model.AppError) {
  4259  	start := timemodule.Now()
  4260  
  4261  	resultVar0, resultVar1 := s.PostStore.AnalyticsPostCountsByDay(options)
  4262  
  4263  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4264  	if s.Root.Metrics != nil {
  4265  		success := "false"
  4266  		if resultVar1 == nil {
  4267  			success = "true"
  4268  		}
  4269  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.AnalyticsPostCountsByDay", success, elapsed)
  4270  	}
  4271  	return resultVar0, resultVar1
  4272  }
  4273  
  4274  func (s *TimerLayerPostStore) AnalyticsUserCountsWithPostsByDay(teamId string) (model.AnalyticsRows, *model.AppError) {
  4275  	start := timemodule.Now()
  4276  
  4277  	resultVar0, resultVar1 := s.PostStore.AnalyticsUserCountsWithPostsByDay(teamId)
  4278  
  4279  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4280  	if s.Root.Metrics != nil {
  4281  		success := "false"
  4282  		if resultVar1 == nil {
  4283  			success = "true"
  4284  		}
  4285  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.AnalyticsUserCountsWithPostsByDay", success, elapsed)
  4286  	}
  4287  	return resultVar0, resultVar1
  4288  }
  4289  
  4290  func (s *TimerLayerPostStore) ClearCaches() {
  4291  	start := timemodule.Now()
  4292  
  4293  	s.PostStore.ClearCaches()
  4294  
  4295  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4296  	if s.Root.Metrics != nil {
  4297  		success := "false"
  4298  		if true {
  4299  			success = "true"
  4300  		}
  4301  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.ClearCaches", success, elapsed)
  4302  	}
  4303  }
  4304  
  4305  func (s *TimerLayerPostStore) Delete(postId string, time int64, deleteByID string) *model.AppError {
  4306  	start := timemodule.Now()
  4307  
  4308  	resultVar0 := s.PostStore.Delete(postId, time, deleteByID)
  4309  
  4310  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4311  	if s.Root.Metrics != nil {
  4312  		success := "false"
  4313  		if resultVar0 == nil {
  4314  			success = "true"
  4315  		}
  4316  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.Delete", success, elapsed)
  4317  	}
  4318  	return resultVar0
  4319  }
  4320  
  4321  func (s *TimerLayerPostStore) Get(id string, skipFetchThreads bool) (*model.PostList, *model.AppError) {
  4322  	start := timemodule.Now()
  4323  
  4324  	resultVar0, resultVar1 := s.PostStore.Get(id, skipFetchThreads)
  4325  
  4326  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4327  	if s.Root.Metrics != nil {
  4328  		success := "false"
  4329  		if resultVar1 == nil {
  4330  			success = "true"
  4331  		}
  4332  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.Get", success, elapsed)
  4333  	}
  4334  	return resultVar0, resultVar1
  4335  }
  4336  
  4337  func (s *TimerLayerPostStore) GetDirectPostParentsForExportAfter(limit int, afterId string) ([]*model.DirectPostForExport, *model.AppError) {
  4338  	start := timemodule.Now()
  4339  
  4340  	resultVar0, resultVar1 := s.PostStore.GetDirectPostParentsForExportAfter(limit, afterId)
  4341  
  4342  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4343  	if s.Root.Metrics != nil {
  4344  		success := "false"
  4345  		if resultVar1 == nil {
  4346  			success = "true"
  4347  		}
  4348  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetDirectPostParentsForExportAfter", success, elapsed)
  4349  	}
  4350  	return resultVar0, resultVar1
  4351  }
  4352  
  4353  func (s *TimerLayerPostStore) GetEtag(channelId string, allowFromCache bool) string {
  4354  	start := timemodule.Now()
  4355  
  4356  	resultVar0 := s.PostStore.GetEtag(channelId, allowFromCache)
  4357  
  4358  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4359  	if s.Root.Metrics != nil {
  4360  		success := "false"
  4361  		if true {
  4362  			success = "true"
  4363  		}
  4364  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetEtag", success, elapsed)
  4365  	}
  4366  	return resultVar0
  4367  }
  4368  
  4369  func (s *TimerLayerPostStore) GetFlaggedPosts(userId string, offset int, limit int) (*model.PostList, *model.AppError) {
  4370  	start := timemodule.Now()
  4371  
  4372  	resultVar0, resultVar1 := s.PostStore.GetFlaggedPosts(userId, offset, limit)
  4373  
  4374  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4375  	if s.Root.Metrics != nil {
  4376  		success := "false"
  4377  		if resultVar1 == nil {
  4378  			success = "true"
  4379  		}
  4380  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetFlaggedPosts", success, elapsed)
  4381  	}
  4382  	return resultVar0, resultVar1
  4383  }
  4384  
  4385  func (s *TimerLayerPostStore) GetFlaggedPostsForChannel(userId string, channelId string, offset int, limit int) (*model.PostList, *model.AppError) {
  4386  	start := timemodule.Now()
  4387  
  4388  	resultVar0, resultVar1 := s.PostStore.GetFlaggedPostsForChannel(userId, channelId, offset, limit)
  4389  
  4390  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4391  	if s.Root.Metrics != nil {
  4392  		success := "false"
  4393  		if resultVar1 == nil {
  4394  			success = "true"
  4395  		}
  4396  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetFlaggedPostsForChannel", success, elapsed)
  4397  	}
  4398  	return resultVar0, resultVar1
  4399  }
  4400  
  4401  func (s *TimerLayerPostStore) GetFlaggedPostsForTeam(userId string, teamId string, offset int, limit int) (*model.PostList, *model.AppError) {
  4402  	start := timemodule.Now()
  4403  
  4404  	resultVar0, resultVar1 := s.PostStore.GetFlaggedPostsForTeam(userId, teamId, offset, limit)
  4405  
  4406  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4407  	if s.Root.Metrics != nil {
  4408  		success := "false"
  4409  		if resultVar1 == nil {
  4410  			success = "true"
  4411  		}
  4412  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetFlaggedPostsForTeam", success, elapsed)
  4413  	}
  4414  	return resultVar0, resultVar1
  4415  }
  4416  
  4417  func (s *TimerLayerPostStore) GetMaxPostSize() int {
  4418  	start := timemodule.Now()
  4419  
  4420  	resultVar0 := s.PostStore.GetMaxPostSize()
  4421  
  4422  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4423  	if s.Root.Metrics != nil {
  4424  		success := "false"
  4425  		if true {
  4426  			success = "true"
  4427  		}
  4428  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetMaxPostSize", success, elapsed)
  4429  	}
  4430  	return resultVar0
  4431  }
  4432  
  4433  func (s *TimerLayerPostStore) GetOldest() (*model.Post, *model.AppError) {
  4434  	start := timemodule.Now()
  4435  
  4436  	resultVar0, resultVar1 := s.PostStore.GetOldest()
  4437  
  4438  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4439  	if s.Root.Metrics != nil {
  4440  		success := "false"
  4441  		if resultVar1 == nil {
  4442  			success = "true"
  4443  		}
  4444  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetOldest", success, elapsed)
  4445  	}
  4446  	return resultVar0, resultVar1
  4447  }
  4448  
  4449  func (s *TimerLayerPostStore) GetOldestEntityCreationTime() (int64, *model.AppError) {
  4450  	start := timemodule.Now()
  4451  
  4452  	resultVar0, resultVar1 := s.PostStore.GetOldestEntityCreationTime()
  4453  
  4454  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4455  	if s.Root.Metrics != nil {
  4456  		success := "false"
  4457  		if resultVar1 == nil {
  4458  			success = "true"
  4459  		}
  4460  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetOldestEntityCreationTime", success, elapsed)
  4461  	}
  4462  	return resultVar0, resultVar1
  4463  }
  4464  
  4465  func (s *TimerLayerPostStore) GetParentsForExportAfter(limit int, afterId string) ([]*model.PostForExport, *model.AppError) {
  4466  	start := timemodule.Now()
  4467  
  4468  	resultVar0, resultVar1 := s.PostStore.GetParentsForExportAfter(limit, afterId)
  4469  
  4470  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4471  	if s.Root.Metrics != nil {
  4472  		success := "false"
  4473  		if resultVar1 == nil {
  4474  			success = "true"
  4475  		}
  4476  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetParentsForExportAfter", success, elapsed)
  4477  	}
  4478  	return resultVar0, resultVar1
  4479  }
  4480  
  4481  func (s *TimerLayerPostStore) GetPostAfterTime(channelId string, time int64) (*model.Post, *model.AppError) {
  4482  	start := timemodule.Now()
  4483  
  4484  	resultVar0, resultVar1 := s.PostStore.GetPostAfterTime(channelId, time)
  4485  
  4486  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4487  	if s.Root.Metrics != nil {
  4488  		success := "false"
  4489  		if resultVar1 == nil {
  4490  			success = "true"
  4491  		}
  4492  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetPostAfterTime", success, elapsed)
  4493  	}
  4494  	return resultVar0, resultVar1
  4495  }
  4496  
  4497  func (s *TimerLayerPostStore) GetPostIdAfterTime(channelId string, time int64) (string, *model.AppError) {
  4498  	start := timemodule.Now()
  4499  
  4500  	resultVar0, resultVar1 := s.PostStore.GetPostIdAfterTime(channelId, time)
  4501  
  4502  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4503  	if s.Root.Metrics != nil {
  4504  		success := "false"
  4505  		if resultVar1 == nil {
  4506  			success = "true"
  4507  		}
  4508  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetPostIdAfterTime", success, elapsed)
  4509  	}
  4510  	return resultVar0, resultVar1
  4511  }
  4512  
  4513  func (s *TimerLayerPostStore) GetPostIdBeforeTime(channelId string, time int64) (string, *model.AppError) {
  4514  	start := timemodule.Now()
  4515  
  4516  	resultVar0, resultVar1 := s.PostStore.GetPostIdBeforeTime(channelId, time)
  4517  
  4518  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4519  	if s.Root.Metrics != nil {
  4520  		success := "false"
  4521  		if resultVar1 == nil {
  4522  			success = "true"
  4523  		}
  4524  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetPostIdBeforeTime", success, elapsed)
  4525  	}
  4526  	return resultVar0, resultVar1
  4527  }
  4528  
  4529  func (s *TimerLayerPostStore) GetPosts(options model.GetPostsOptions, allowFromCache bool) (*model.PostList, *model.AppError) {
  4530  	start := timemodule.Now()
  4531  
  4532  	resultVar0, resultVar1 := s.PostStore.GetPosts(options, allowFromCache)
  4533  
  4534  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4535  	if s.Root.Metrics != nil {
  4536  		success := "false"
  4537  		if resultVar1 == nil {
  4538  			success = "true"
  4539  		}
  4540  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetPosts", success, elapsed)
  4541  	}
  4542  	return resultVar0, resultVar1
  4543  }
  4544  
  4545  func (s *TimerLayerPostStore) GetPostsAfter(options model.GetPostsOptions) (*model.PostList, *model.AppError) {
  4546  	start := timemodule.Now()
  4547  
  4548  	resultVar0, resultVar1 := s.PostStore.GetPostsAfter(options)
  4549  
  4550  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4551  	if s.Root.Metrics != nil {
  4552  		success := "false"
  4553  		if resultVar1 == nil {
  4554  			success = "true"
  4555  		}
  4556  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetPostsAfter", success, elapsed)
  4557  	}
  4558  	return resultVar0, resultVar1
  4559  }
  4560  
  4561  func (s *TimerLayerPostStore) GetPostsBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.PostForIndexing, *model.AppError) {
  4562  	start := timemodule.Now()
  4563  
  4564  	resultVar0, resultVar1 := s.PostStore.GetPostsBatchForIndexing(startTime, endTime, limit)
  4565  
  4566  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4567  	if s.Root.Metrics != nil {
  4568  		success := "false"
  4569  		if resultVar1 == nil {
  4570  			success = "true"
  4571  		}
  4572  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetPostsBatchForIndexing", success, elapsed)
  4573  	}
  4574  	return resultVar0, resultVar1
  4575  }
  4576  
  4577  func (s *TimerLayerPostStore) GetPostsBefore(options model.GetPostsOptions) (*model.PostList, *model.AppError) {
  4578  	start := timemodule.Now()
  4579  
  4580  	resultVar0, resultVar1 := s.PostStore.GetPostsBefore(options)
  4581  
  4582  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4583  	if s.Root.Metrics != nil {
  4584  		success := "false"
  4585  		if resultVar1 == nil {
  4586  			success = "true"
  4587  		}
  4588  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetPostsBefore", success, elapsed)
  4589  	}
  4590  	return resultVar0, resultVar1
  4591  }
  4592  
  4593  func (s *TimerLayerPostStore) GetPostsByIds(postIds []string) ([]*model.Post, *model.AppError) {
  4594  	start := timemodule.Now()
  4595  
  4596  	resultVar0, resultVar1 := s.PostStore.GetPostsByIds(postIds)
  4597  
  4598  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4599  	if s.Root.Metrics != nil {
  4600  		success := "false"
  4601  		if resultVar1 == nil {
  4602  			success = "true"
  4603  		}
  4604  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetPostsByIds", success, elapsed)
  4605  	}
  4606  	return resultVar0, resultVar1
  4607  }
  4608  
  4609  func (s *TimerLayerPostStore) GetPostsCreatedAt(channelId string, time int64) ([]*model.Post, *model.AppError) {
  4610  	start := timemodule.Now()
  4611  
  4612  	resultVar0, resultVar1 := s.PostStore.GetPostsCreatedAt(channelId, time)
  4613  
  4614  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4615  	if s.Root.Metrics != nil {
  4616  		success := "false"
  4617  		if resultVar1 == nil {
  4618  			success = "true"
  4619  		}
  4620  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetPostsCreatedAt", success, elapsed)
  4621  	}
  4622  	return resultVar0, resultVar1
  4623  }
  4624  
  4625  func (s *TimerLayerPostStore) GetPostsSince(options model.GetPostsSinceOptions, allowFromCache bool) (*model.PostList, *model.AppError) {
  4626  	start := timemodule.Now()
  4627  
  4628  	resultVar0, resultVar1 := s.PostStore.GetPostsSince(options, allowFromCache)
  4629  
  4630  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4631  	if s.Root.Metrics != nil {
  4632  		success := "false"
  4633  		if resultVar1 == nil {
  4634  			success = "true"
  4635  		}
  4636  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetPostsSince", success, elapsed)
  4637  	}
  4638  	return resultVar0, resultVar1
  4639  }
  4640  
  4641  func (s *TimerLayerPostStore) GetRepliesForExport(parentId string) ([]*model.ReplyForExport, *model.AppError) {
  4642  	start := timemodule.Now()
  4643  
  4644  	resultVar0, resultVar1 := s.PostStore.GetRepliesForExport(parentId)
  4645  
  4646  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4647  	if s.Root.Metrics != nil {
  4648  		success := "false"
  4649  		if resultVar1 == nil {
  4650  			success = "true"
  4651  		}
  4652  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetRepliesForExport", success, elapsed)
  4653  	}
  4654  	return resultVar0, resultVar1
  4655  }
  4656  
  4657  func (s *TimerLayerPostStore) GetSingle(id string) (*model.Post, *model.AppError) {
  4658  	start := timemodule.Now()
  4659  
  4660  	resultVar0, resultVar1 := s.PostStore.GetSingle(id)
  4661  
  4662  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4663  	if s.Root.Metrics != nil {
  4664  		success := "false"
  4665  		if resultVar1 == nil {
  4666  			success = "true"
  4667  		}
  4668  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.GetSingle", success, elapsed)
  4669  	}
  4670  	return resultVar0, resultVar1
  4671  }
  4672  
  4673  func (s *TimerLayerPostStore) InvalidateLastPostTimeCache(channelId string) {
  4674  	start := timemodule.Now()
  4675  
  4676  	s.PostStore.InvalidateLastPostTimeCache(channelId)
  4677  
  4678  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4679  	if s.Root.Metrics != nil {
  4680  		success := "false"
  4681  		if true {
  4682  			success = "true"
  4683  		}
  4684  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.InvalidateLastPostTimeCache", success, elapsed)
  4685  	}
  4686  }
  4687  
  4688  func (s *TimerLayerPostStore) Overwrite(post *model.Post) (*model.Post, *model.AppError) {
  4689  	start := timemodule.Now()
  4690  
  4691  	resultVar0, resultVar1 := s.PostStore.Overwrite(post)
  4692  
  4693  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4694  	if s.Root.Metrics != nil {
  4695  		success := "false"
  4696  		if resultVar1 == nil {
  4697  			success = "true"
  4698  		}
  4699  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.Overwrite", success, elapsed)
  4700  	}
  4701  	return resultVar0, resultVar1
  4702  }
  4703  
  4704  func (s *TimerLayerPostStore) OverwriteMultiple(posts []*model.Post) ([]*model.Post, int, *model.AppError) {
  4705  	start := timemodule.Now()
  4706  
  4707  	resultVar0, resultVar1, resultVar2 := s.PostStore.OverwriteMultiple(posts)
  4708  
  4709  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4710  	if s.Root.Metrics != nil {
  4711  		success := "false"
  4712  		if resultVar2 == nil {
  4713  			success = "true"
  4714  		}
  4715  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.OverwriteMultiple", success, elapsed)
  4716  	}
  4717  	return resultVar0, resultVar1, resultVar2
  4718  }
  4719  
  4720  func (s *TimerLayerPostStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) {
  4721  	start := timemodule.Now()
  4722  
  4723  	resultVar0, resultVar1 := s.PostStore.PermanentDeleteBatch(endTime, limit)
  4724  
  4725  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4726  	if s.Root.Metrics != nil {
  4727  		success := "false"
  4728  		if resultVar1 == nil {
  4729  			success = "true"
  4730  		}
  4731  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.PermanentDeleteBatch", success, elapsed)
  4732  	}
  4733  	return resultVar0, resultVar1
  4734  }
  4735  
  4736  func (s *TimerLayerPostStore) PermanentDeleteByChannel(channelId string) *model.AppError {
  4737  	start := timemodule.Now()
  4738  
  4739  	resultVar0 := s.PostStore.PermanentDeleteByChannel(channelId)
  4740  
  4741  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4742  	if s.Root.Metrics != nil {
  4743  		success := "false"
  4744  		if resultVar0 == nil {
  4745  			success = "true"
  4746  		}
  4747  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.PermanentDeleteByChannel", success, elapsed)
  4748  	}
  4749  	return resultVar0
  4750  }
  4751  
  4752  func (s *TimerLayerPostStore) PermanentDeleteByUser(userId string) *model.AppError {
  4753  	start := timemodule.Now()
  4754  
  4755  	resultVar0 := s.PostStore.PermanentDeleteByUser(userId)
  4756  
  4757  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4758  	if s.Root.Metrics != nil {
  4759  		success := "false"
  4760  		if resultVar0 == nil {
  4761  			success = "true"
  4762  		}
  4763  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.PermanentDeleteByUser", success, elapsed)
  4764  	}
  4765  	return resultVar0
  4766  }
  4767  
  4768  func (s *TimerLayerPostStore) Save(post *model.Post) (*model.Post, *model.AppError) {
  4769  	start := timemodule.Now()
  4770  
  4771  	resultVar0, resultVar1 := s.PostStore.Save(post)
  4772  
  4773  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4774  	if s.Root.Metrics != nil {
  4775  		success := "false"
  4776  		if resultVar1 == nil {
  4777  			success = "true"
  4778  		}
  4779  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.Save", success, elapsed)
  4780  	}
  4781  	return resultVar0, resultVar1
  4782  }
  4783  
  4784  func (s *TimerLayerPostStore) SaveMultiple(posts []*model.Post) ([]*model.Post, int, *model.AppError) {
  4785  	start := timemodule.Now()
  4786  
  4787  	resultVar0, resultVar1, resultVar2 := s.PostStore.SaveMultiple(posts)
  4788  
  4789  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4790  	if s.Root.Metrics != nil {
  4791  		success := "false"
  4792  		if resultVar2 == nil {
  4793  			success = "true"
  4794  		}
  4795  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.SaveMultiple", success, elapsed)
  4796  	}
  4797  	return resultVar0, resultVar1, resultVar2
  4798  }
  4799  
  4800  func (s *TimerLayerPostStore) Search(teamId string, userId string, params *model.SearchParams) (*model.PostList, *model.AppError) {
  4801  	start := timemodule.Now()
  4802  
  4803  	resultVar0, resultVar1 := s.PostStore.Search(teamId, userId, params)
  4804  
  4805  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4806  	if s.Root.Metrics != nil {
  4807  		success := "false"
  4808  		if resultVar1 == nil {
  4809  			success = "true"
  4810  		}
  4811  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.Search", success, elapsed)
  4812  	}
  4813  	return resultVar0, resultVar1
  4814  }
  4815  
  4816  func (s *TimerLayerPostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId string, teamId string, isOrSearch bool, includeDeletedChannels bool, page int, perPage int) (*model.PostSearchResults, *model.AppError) {
  4817  	start := timemodule.Now()
  4818  
  4819  	resultVar0, resultVar1 := s.PostStore.SearchPostsInTeamForUser(paramsList, userId, teamId, isOrSearch, includeDeletedChannels, page, perPage)
  4820  
  4821  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4822  	if s.Root.Metrics != nil {
  4823  		success := "false"
  4824  		if resultVar1 == nil {
  4825  			success = "true"
  4826  		}
  4827  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.SearchPostsInTeamForUser", success, elapsed)
  4828  	}
  4829  	return resultVar0, resultVar1
  4830  }
  4831  
  4832  func (s *TimerLayerPostStore) Update(newPost *model.Post, oldPost *model.Post) (*model.Post, *model.AppError) {
  4833  	start := timemodule.Now()
  4834  
  4835  	resultVar0, resultVar1 := s.PostStore.Update(newPost, oldPost)
  4836  
  4837  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4838  	if s.Root.Metrics != nil {
  4839  		success := "false"
  4840  		if resultVar1 == nil {
  4841  			success = "true"
  4842  		}
  4843  		s.Root.Metrics.ObserveStoreMethodDuration("PostStore.Update", success, elapsed)
  4844  	}
  4845  	return resultVar0, resultVar1
  4846  }
  4847  
  4848  func (s *TimerLayerPreferenceStore) CleanupFlagsBatch(limit int64) (int64, error) {
  4849  	start := timemodule.Now()
  4850  
  4851  	resultVar0, resultVar1 := s.PreferenceStore.CleanupFlagsBatch(limit)
  4852  
  4853  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4854  	if s.Root.Metrics != nil {
  4855  		success := "false"
  4856  		if resultVar1 == nil {
  4857  			success = "true"
  4858  		}
  4859  		s.Root.Metrics.ObserveStoreMethodDuration("PreferenceStore.CleanupFlagsBatch", success, elapsed)
  4860  	}
  4861  	return resultVar0, resultVar1
  4862  }
  4863  
  4864  func (s *TimerLayerPreferenceStore) Delete(userId string, category string, name string) error {
  4865  	start := timemodule.Now()
  4866  
  4867  	resultVar0 := s.PreferenceStore.Delete(userId, category, name)
  4868  
  4869  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4870  	if s.Root.Metrics != nil {
  4871  		success := "false"
  4872  		if resultVar0 == nil {
  4873  			success = "true"
  4874  		}
  4875  		s.Root.Metrics.ObserveStoreMethodDuration("PreferenceStore.Delete", success, elapsed)
  4876  	}
  4877  	return resultVar0
  4878  }
  4879  
  4880  func (s *TimerLayerPreferenceStore) DeleteCategory(userId string, category string) error {
  4881  	start := timemodule.Now()
  4882  
  4883  	resultVar0 := s.PreferenceStore.DeleteCategory(userId, category)
  4884  
  4885  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4886  	if s.Root.Metrics != nil {
  4887  		success := "false"
  4888  		if resultVar0 == nil {
  4889  			success = "true"
  4890  		}
  4891  		s.Root.Metrics.ObserveStoreMethodDuration("PreferenceStore.DeleteCategory", success, elapsed)
  4892  	}
  4893  	return resultVar0
  4894  }
  4895  
  4896  func (s *TimerLayerPreferenceStore) DeleteCategoryAndName(category string, name string) error {
  4897  	start := timemodule.Now()
  4898  
  4899  	resultVar0 := s.PreferenceStore.DeleteCategoryAndName(category, name)
  4900  
  4901  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4902  	if s.Root.Metrics != nil {
  4903  		success := "false"
  4904  		if resultVar0 == nil {
  4905  			success = "true"
  4906  		}
  4907  		s.Root.Metrics.ObserveStoreMethodDuration("PreferenceStore.DeleteCategoryAndName", success, elapsed)
  4908  	}
  4909  	return resultVar0
  4910  }
  4911  
  4912  func (s *TimerLayerPreferenceStore) Get(userId string, category string, name string) (*model.Preference, error) {
  4913  	start := timemodule.Now()
  4914  
  4915  	resultVar0, resultVar1 := s.PreferenceStore.Get(userId, category, name)
  4916  
  4917  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4918  	if s.Root.Metrics != nil {
  4919  		success := "false"
  4920  		if resultVar1 == nil {
  4921  			success = "true"
  4922  		}
  4923  		s.Root.Metrics.ObserveStoreMethodDuration("PreferenceStore.Get", success, elapsed)
  4924  	}
  4925  	return resultVar0, resultVar1
  4926  }
  4927  
  4928  func (s *TimerLayerPreferenceStore) GetAll(userId string) (model.Preferences, error) {
  4929  	start := timemodule.Now()
  4930  
  4931  	resultVar0, resultVar1 := s.PreferenceStore.GetAll(userId)
  4932  
  4933  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4934  	if s.Root.Metrics != nil {
  4935  		success := "false"
  4936  		if resultVar1 == nil {
  4937  			success = "true"
  4938  		}
  4939  		s.Root.Metrics.ObserveStoreMethodDuration("PreferenceStore.GetAll", success, elapsed)
  4940  	}
  4941  	return resultVar0, resultVar1
  4942  }
  4943  
  4944  func (s *TimerLayerPreferenceStore) GetCategory(userId string, category string) (model.Preferences, error) {
  4945  	start := timemodule.Now()
  4946  
  4947  	resultVar0, resultVar1 := s.PreferenceStore.GetCategory(userId, category)
  4948  
  4949  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4950  	if s.Root.Metrics != nil {
  4951  		success := "false"
  4952  		if resultVar1 == nil {
  4953  			success = "true"
  4954  		}
  4955  		s.Root.Metrics.ObserveStoreMethodDuration("PreferenceStore.GetCategory", success, elapsed)
  4956  	}
  4957  	return resultVar0, resultVar1
  4958  }
  4959  
  4960  func (s *TimerLayerPreferenceStore) PermanentDeleteByUser(userId string) error {
  4961  	start := timemodule.Now()
  4962  
  4963  	resultVar0 := s.PreferenceStore.PermanentDeleteByUser(userId)
  4964  
  4965  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4966  	if s.Root.Metrics != nil {
  4967  		success := "false"
  4968  		if resultVar0 == nil {
  4969  			success = "true"
  4970  		}
  4971  		s.Root.Metrics.ObserveStoreMethodDuration("PreferenceStore.PermanentDeleteByUser", success, elapsed)
  4972  	}
  4973  	return resultVar0
  4974  }
  4975  
  4976  func (s *TimerLayerPreferenceStore) Save(preferences *model.Preferences) error {
  4977  	start := timemodule.Now()
  4978  
  4979  	resultVar0 := s.PreferenceStore.Save(preferences)
  4980  
  4981  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4982  	if s.Root.Metrics != nil {
  4983  		success := "false"
  4984  		if resultVar0 == nil {
  4985  			success = "true"
  4986  		}
  4987  		s.Root.Metrics.ObserveStoreMethodDuration("PreferenceStore.Save", success, elapsed)
  4988  	}
  4989  	return resultVar0
  4990  }
  4991  
  4992  func (s *TimerLayerReactionStore) BulkGetForPosts(postIds []string) ([]*model.Reaction, error) {
  4993  	start := timemodule.Now()
  4994  
  4995  	resultVar0, resultVar1 := s.ReactionStore.BulkGetForPosts(postIds)
  4996  
  4997  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  4998  	if s.Root.Metrics != nil {
  4999  		success := "false"
  5000  		if resultVar1 == nil {
  5001  			success = "true"
  5002  		}
  5003  		s.Root.Metrics.ObserveStoreMethodDuration("ReactionStore.BulkGetForPosts", success, elapsed)
  5004  	}
  5005  	return resultVar0, resultVar1
  5006  }
  5007  
  5008  func (s *TimerLayerReactionStore) Delete(reaction *model.Reaction) (*model.Reaction, error) {
  5009  	start := timemodule.Now()
  5010  
  5011  	resultVar0, resultVar1 := s.ReactionStore.Delete(reaction)
  5012  
  5013  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5014  	if s.Root.Metrics != nil {
  5015  		success := "false"
  5016  		if resultVar1 == nil {
  5017  			success = "true"
  5018  		}
  5019  		s.Root.Metrics.ObserveStoreMethodDuration("ReactionStore.Delete", success, elapsed)
  5020  	}
  5021  	return resultVar0, resultVar1
  5022  }
  5023  
  5024  func (s *TimerLayerReactionStore) DeleteAllWithEmojiName(emojiName string) error {
  5025  	start := timemodule.Now()
  5026  
  5027  	resultVar0 := s.ReactionStore.DeleteAllWithEmojiName(emojiName)
  5028  
  5029  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5030  	if s.Root.Metrics != nil {
  5031  		success := "false"
  5032  		if resultVar0 == nil {
  5033  			success = "true"
  5034  		}
  5035  		s.Root.Metrics.ObserveStoreMethodDuration("ReactionStore.DeleteAllWithEmojiName", success, elapsed)
  5036  	}
  5037  	return resultVar0
  5038  }
  5039  
  5040  func (s *TimerLayerReactionStore) GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, error) {
  5041  	start := timemodule.Now()
  5042  
  5043  	resultVar0, resultVar1 := s.ReactionStore.GetForPost(postId, allowFromCache)
  5044  
  5045  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5046  	if s.Root.Metrics != nil {
  5047  		success := "false"
  5048  		if resultVar1 == nil {
  5049  			success = "true"
  5050  		}
  5051  		s.Root.Metrics.ObserveStoreMethodDuration("ReactionStore.GetForPost", success, elapsed)
  5052  	}
  5053  	return resultVar0, resultVar1
  5054  }
  5055  
  5056  func (s *TimerLayerReactionStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, error) {
  5057  	start := timemodule.Now()
  5058  
  5059  	resultVar0, resultVar1 := s.ReactionStore.PermanentDeleteBatch(endTime, limit)
  5060  
  5061  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5062  	if s.Root.Metrics != nil {
  5063  		success := "false"
  5064  		if resultVar1 == nil {
  5065  			success = "true"
  5066  		}
  5067  		s.Root.Metrics.ObserveStoreMethodDuration("ReactionStore.PermanentDeleteBatch", success, elapsed)
  5068  	}
  5069  	return resultVar0, resultVar1
  5070  }
  5071  
  5072  func (s *TimerLayerReactionStore) Save(reaction *model.Reaction) (*model.Reaction, error) {
  5073  	start := timemodule.Now()
  5074  
  5075  	resultVar0, resultVar1 := s.ReactionStore.Save(reaction)
  5076  
  5077  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5078  	if s.Root.Metrics != nil {
  5079  		success := "false"
  5080  		if resultVar1 == nil {
  5081  			success = "true"
  5082  		}
  5083  		s.Root.Metrics.ObserveStoreMethodDuration("ReactionStore.Save", success, elapsed)
  5084  	}
  5085  	return resultVar0, resultVar1
  5086  }
  5087  
  5088  func (s *TimerLayerRoleStore) AllChannelSchemeRoles() ([]*model.Role, error) {
  5089  	start := timemodule.Now()
  5090  
  5091  	resultVar0, resultVar1 := s.RoleStore.AllChannelSchemeRoles()
  5092  
  5093  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5094  	if s.Root.Metrics != nil {
  5095  		success := "false"
  5096  		if resultVar1 == nil {
  5097  			success = "true"
  5098  		}
  5099  		s.Root.Metrics.ObserveStoreMethodDuration("RoleStore.AllChannelSchemeRoles", success, elapsed)
  5100  	}
  5101  	return resultVar0, resultVar1
  5102  }
  5103  
  5104  func (s *TimerLayerRoleStore) ChannelHigherScopedPermissions(roleNames []string) (map[string]*model.RolePermissions, error) {
  5105  	start := timemodule.Now()
  5106  
  5107  	resultVar0, resultVar1 := s.RoleStore.ChannelHigherScopedPermissions(roleNames)
  5108  
  5109  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5110  	if s.Root.Metrics != nil {
  5111  		success := "false"
  5112  		if resultVar1 == nil {
  5113  			success = "true"
  5114  		}
  5115  		s.Root.Metrics.ObserveStoreMethodDuration("RoleStore.ChannelHigherScopedPermissions", success, elapsed)
  5116  	}
  5117  	return resultVar0, resultVar1
  5118  }
  5119  
  5120  func (s *TimerLayerRoleStore) ChannelRolesUnderTeamRole(roleName string) ([]*model.Role, error) {
  5121  	start := timemodule.Now()
  5122  
  5123  	resultVar0, resultVar1 := s.RoleStore.ChannelRolesUnderTeamRole(roleName)
  5124  
  5125  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5126  	if s.Root.Metrics != nil {
  5127  		success := "false"
  5128  		if resultVar1 == nil {
  5129  			success = "true"
  5130  		}
  5131  		s.Root.Metrics.ObserveStoreMethodDuration("RoleStore.ChannelRolesUnderTeamRole", success, elapsed)
  5132  	}
  5133  	return resultVar0, resultVar1
  5134  }
  5135  
  5136  func (s *TimerLayerRoleStore) Delete(roleId string) (*model.Role, error) {
  5137  	start := timemodule.Now()
  5138  
  5139  	resultVar0, resultVar1 := s.RoleStore.Delete(roleId)
  5140  
  5141  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5142  	if s.Root.Metrics != nil {
  5143  		success := "false"
  5144  		if resultVar1 == nil {
  5145  			success = "true"
  5146  		}
  5147  		s.Root.Metrics.ObserveStoreMethodDuration("RoleStore.Delete", success, elapsed)
  5148  	}
  5149  	return resultVar0, resultVar1
  5150  }
  5151  
  5152  func (s *TimerLayerRoleStore) Get(roleId string) (*model.Role, error) {
  5153  	start := timemodule.Now()
  5154  
  5155  	resultVar0, resultVar1 := s.RoleStore.Get(roleId)
  5156  
  5157  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5158  	if s.Root.Metrics != nil {
  5159  		success := "false"
  5160  		if resultVar1 == nil {
  5161  			success = "true"
  5162  		}
  5163  		s.Root.Metrics.ObserveStoreMethodDuration("RoleStore.Get", success, elapsed)
  5164  	}
  5165  	return resultVar0, resultVar1
  5166  }
  5167  
  5168  func (s *TimerLayerRoleStore) GetAll() ([]*model.Role, error) {
  5169  	start := timemodule.Now()
  5170  
  5171  	resultVar0, resultVar1 := s.RoleStore.GetAll()
  5172  
  5173  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5174  	if s.Root.Metrics != nil {
  5175  		success := "false"
  5176  		if resultVar1 == nil {
  5177  			success = "true"
  5178  		}
  5179  		s.Root.Metrics.ObserveStoreMethodDuration("RoleStore.GetAll", success, elapsed)
  5180  	}
  5181  	return resultVar0, resultVar1
  5182  }
  5183  
  5184  func (s *TimerLayerRoleStore) GetByName(name string) (*model.Role, error) {
  5185  	start := timemodule.Now()
  5186  
  5187  	resultVar0, resultVar1 := s.RoleStore.GetByName(name)
  5188  
  5189  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5190  	if s.Root.Metrics != nil {
  5191  		success := "false"
  5192  		if resultVar1 == nil {
  5193  			success = "true"
  5194  		}
  5195  		s.Root.Metrics.ObserveStoreMethodDuration("RoleStore.GetByName", success, elapsed)
  5196  	}
  5197  	return resultVar0, resultVar1
  5198  }
  5199  
  5200  func (s *TimerLayerRoleStore) GetByNames(names []string) ([]*model.Role, error) {
  5201  	start := timemodule.Now()
  5202  
  5203  	resultVar0, resultVar1 := s.RoleStore.GetByNames(names)
  5204  
  5205  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5206  	if s.Root.Metrics != nil {
  5207  		success := "false"
  5208  		if resultVar1 == nil {
  5209  			success = "true"
  5210  		}
  5211  		s.Root.Metrics.ObserveStoreMethodDuration("RoleStore.GetByNames", success, elapsed)
  5212  	}
  5213  	return resultVar0, resultVar1
  5214  }
  5215  
  5216  func (s *TimerLayerRoleStore) PermanentDeleteAll() error {
  5217  	start := timemodule.Now()
  5218  
  5219  	resultVar0 := s.RoleStore.PermanentDeleteAll()
  5220  
  5221  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5222  	if s.Root.Metrics != nil {
  5223  		success := "false"
  5224  		if resultVar0 == nil {
  5225  			success = "true"
  5226  		}
  5227  		s.Root.Metrics.ObserveStoreMethodDuration("RoleStore.PermanentDeleteAll", success, elapsed)
  5228  	}
  5229  	return resultVar0
  5230  }
  5231  
  5232  func (s *TimerLayerRoleStore) Save(role *model.Role) (*model.Role, error) {
  5233  	start := timemodule.Now()
  5234  
  5235  	resultVar0, resultVar1 := s.RoleStore.Save(role)
  5236  
  5237  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5238  	if s.Root.Metrics != nil {
  5239  		success := "false"
  5240  		if resultVar1 == nil {
  5241  			success = "true"
  5242  		}
  5243  		s.Root.Metrics.ObserveStoreMethodDuration("RoleStore.Save", success, elapsed)
  5244  	}
  5245  	return resultVar0, resultVar1
  5246  }
  5247  
  5248  func (s *TimerLayerSchemeStore) CountByScope(scope string) (int64, error) {
  5249  	start := timemodule.Now()
  5250  
  5251  	resultVar0, resultVar1 := s.SchemeStore.CountByScope(scope)
  5252  
  5253  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5254  	if s.Root.Metrics != nil {
  5255  		success := "false"
  5256  		if resultVar1 == nil {
  5257  			success = "true"
  5258  		}
  5259  		s.Root.Metrics.ObserveStoreMethodDuration("SchemeStore.CountByScope", success, elapsed)
  5260  	}
  5261  	return resultVar0, resultVar1
  5262  }
  5263  
  5264  func (s *TimerLayerSchemeStore) CountWithoutPermission(scope string, permissionID string, roleScope model.RoleScope, roleType model.RoleType) (int64, error) {
  5265  	start := timemodule.Now()
  5266  
  5267  	resultVar0, resultVar1 := s.SchemeStore.CountWithoutPermission(scope, permissionID, roleScope, roleType)
  5268  
  5269  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5270  	if s.Root.Metrics != nil {
  5271  		success := "false"
  5272  		if resultVar1 == nil {
  5273  			success = "true"
  5274  		}
  5275  		s.Root.Metrics.ObserveStoreMethodDuration("SchemeStore.CountWithoutPermission", success, elapsed)
  5276  	}
  5277  	return resultVar0, resultVar1
  5278  }
  5279  
  5280  func (s *TimerLayerSchemeStore) Delete(schemeId string) (*model.Scheme, error) {
  5281  	start := timemodule.Now()
  5282  
  5283  	resultVar0, resultVar1 := s.SchemeStore.Delete(schemeId)
  5284  
  5285  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5286  	if s.Root.Metrics != nil {
  5287  		success := "false"
  5288  		if resultVar1 == nil {
  5289  			success = "true"
  5290  		}
  5291  		s.Root.Metrics.ObserveStoreMethodDuration("SchemeStore.Delete", success, elapsed)
  5292  	}
  5293  	return resultVar0, resultVar1
  5294  }
  5295  
  5296  func (s *TimerLayerSchemeStore) Get(schemeId string) (*model.Scheme, error) {
  5297  	start := timemodule.Now()
  5298  
  5299  	resultVar0, resultVar1 := s.SchemeStore.Get(schemeId)
  5300  
  5301  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5302  	if s.Root.Metrics != nil {
  5303  		success := "false"
  5304  		if resultVar1 == nil {
  5305  			success = "true"
  5306  		}
  5307  		s.Root.Metrics.ObserveStoreMethodDuration("SchemeStore.Get", success, elapsed)
  5308  	}
  5309  	return resultVar0, resultVar1
  5310  }
  5311  
  5312  func (s *TimerLayerSchemeStore) GetAllPage(scope string, offset int, limit int) ([]*model.Scheme, error) {
  5313  	start := timemodule.Now()
  5314  
  5315  	resultVar0, resultVar1 := s.SchemeStore.GetAllPage(scope, offset, limit)
  5316  
  5317  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5318  	if s.Root.Metrics != nil {
  5319  		success := "false"
  5320  		if resultVar1 == nil {
  5321  			success = "true"
  5322  		}
  5323  		s.Root.Metrics.ObserveStoreMethodDuration("SchemeStore.GetAllPage", success, elapsed)
  5324  	}
  5325  	return resultVar0, resultVar1
  5326  }
  5327  
  5328  func (s *TimerLayerSchemeStore) GetByName(schemeName string) (*model.Scheme, error) {
  5329  	start := timemodule.Now()
  5330  
  5331  	resultVar0, resultVar1 := s.SchemeStore.GetByName(schemeName)
  5332  
  5333  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5334  	if s.Root.Metrics != nil {
  5335  		success := "false"
  5336  		if resultVar1 == nil {
  5337  			success = "true"
  5338  		}
  5339  		s.Root.Metrics.ObserveStoreMethodDuration("SchemeStore.GetByName", success, elapsed)
  5340  	}
  5341  	return resultVar0, resultVar1
  5342  }
  5343  
  5344  func (s *TimerLayerSchemeStore) PermanentDeleteAll() error {
  5345  	start := timemodule.Now()
  5346  
  5347  	resultVar0 := s.SchemeStore.PermanentDeleteAll()
  5348  
  5349  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5350  	if s.Root.Metrics != nil {
  5351  		success := "false"
  5352  		if resultVar0 == nil {
  5353  			success = "true"
  5354  		}
  5355  		s.Root.Metrics.ObserveStoreMethodDuration("SchemeStore.PermanentDeleteAll", success, elapsed)
  5356  	}
  5357  	return resultVar0
  5358  }
  5359  
  5360  func (s *TimerLayerSchemeStore) Save(scheme *model.Scheme) (*model.Scheme, error) {
  5361  	start := timemodule.Now()
  5362  
  5363  	resultVar0, resultVar1 := s.SchemeStore.Save(scheme)
  5364  
  5365  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5366  	if s.Root.Metrics != nil {
  5367  		success := "false"
  5368  		if resultVar1 == nil {
  5369  			success = "true"
  5370  		}
  5371  		s.Root.Metrics.ObserveStoreMethodDuration("SchemeStore.Save", success, elapsed)
  5372  	}
  5373  	return resultVar0, resultVar1
  5374  }
  5375  
  5376  func (s *TimerLayerSessionStore) AnalyticsSessionCount() (int64, error) {
  5377  	start := timemodule.Now()
  5378  
  5379  	resultVar0, resultVar1 := s.SessionStore.AnalyticsSessionCount()
  5380  
  5381  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5382  	if s.Root.Metrics != nil {
  5383  		success := "false"
  5384  		if resultVar1 == nil {
  5385  			success = "true"
  5386  		}
  5387  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.AnalyticsSessionCount", success, elapsed)
  5388  	}
  5389  	return resultVar0, resultVar1
  5390  }
  5391  
  5392  func (s *TimerLayerSessionStore) Cleanup(expiryTime int64, batchSize int64) {
  5393  	start := timemodule.Now()
  5394  
  5395  	s.SessionStore.Cleanup(expiryTime, batchSize)
  5396  
  5397  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5398  	if s.Root.Metrics != nil {
  5399  		success := "false"
  5400  		if true {
  5401  			success = "true"
  5402  		}
  5403  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.Cleanup", success, elapsed)
  5404  	}
  5405  }
  5406  
  5407  func (s *TimerLayerSessionStore) Get(sessionIdOrToken string) (*model.Session, error) {
  5408  	start := timemodule.Now()
  5409  
  5410  	resultVar0, resultVar1 := s.SessionStore.Get(sessionIdOrToken)
  5411  
  5412  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5413  	if s.Root.Metrics != nil {
  5414  		success := "false"
  5415  		if resultVar1 == nil {
  5416  			success = "true"
  5417  		}
  5418  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.Get", success, elapsed)
  5419  	}
  5420  	return resultVar0, resultVar1
  5421  }
  5422  
  5423  func (s *TimerLayerSessionStore) GetSessions(userId string) ([]*model.Session, error) {
  5424  	start := timemodule.Now()
  5425  
  5426  	resultVar0, resultVar1 := s.SessionStore.GetSessions(userId)
  5427  
  5428  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5429  	if s.Root.Metrics != nil {
  5430  		success := "false"
  5431  		if resultVar1 == nil {
  5432  			success = "true"
  5433  		}
  5434  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.GetSessions", success, elapsed)
  5435  	}
  5436  	return resultVar0, resultVar1
  5437  }
  5438  
  5439  func (s *TimerLayerSessionStore) GetSessionsExpired(thresholdMillis int64, mobileOnly bool, unnotifiedOnly bool) ([]*model.Session, error) {
  5440  	start := timemodule.Now()
  5441  
  5442  	resultVar0, resultVar1 := s.SessionStore.GetSessionsExpired(thresholdMillis, mobileOnly, unnotifiedOnly)
  5443  
  5444  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5445  	if s.Root.Metrics != nil {
  5446  		success := "false"
  5447  		if resultVar1 == nil {
  5448  			success = "true"
  5449  		}
  5450  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.GetSessionsExpired", success, elapsed)
  5451  	}
  5452  	return resultVar0, resultVar1
  5453  }
  5454  
  5455  func (s *TimerLayerSessionStore) GetSessionsWithActiveDeviceIds(userId string) ([]*model.Session, error) {
  5456  	start := timemodule.Now()
  5457  
  5458  	resultVar0, resultVar1 := s.SessionStore.GetSessionsWithActiveDeviceIds(userId)
  5459  
  5460  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5461  	if s.Root.Metrics != nil {
  5462  		success := "false"
  5463  		if resultVar1 == nil {
  5464  			success = "true"
  5465  		}
  5466  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.GetSessionsWithActiveDeviceIds", success, elapsed)
  5467  	}
  5468  	return resultVar0, resultVar1
  5469  }
  5470  
  5471  func (s *TimerLayerSessionStore) PermanentDeleteSessionsByUser(teamId string) error {
  5472  	start := timemodule.Now()
  5473  
  5474  	resultVar0 := s.SessionStore.PermanentDeleteSessionsByUser(teamId)
  5475  
  5476  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5477  	if s.Root.Metrics != nil {
  5478  		success := "false"
  5479  		if resultVar0 == nil {
  5480  			success = "true"
  5481  		}
  5482  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.PermanentDeleteSessionsByUser", success, elapsed)
  5483  	}
  5484  	return resultVar0
  5485  }
  5486  
  5487  func (s *TimerLayerSessionStore) Remove(sessionIdOrToken string) error {
  5488  	start := timemodule.Now()
  5489  
  5490  	resultVar0 := s.SessionStore.Remove(sessionIdOrToken)
  5491  
  5492  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5493  	if s.Root.Metrics != nil {
  5494  		success := "false"
  5495  		if resultVar0 == nil {
  5496  			success = "true"
  5497  		}
  5498  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.Remove", success, elapsed)
  5499  	}
  5500  	return resultVar0
  5501  }
  5502  
  5503  func (s *TimerLayerSessionStore) RemoveAllSessions() error {
  5504  	start := timemodule.Now()
  5505  
  5506  	resultVar0 := s.SessionStore.RemoveAllSessions()
  5507  
  5508  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5509  	if s.Root.Metrics != nil {
  5510  		success := "false"
  5511  		if resultVar0 == nil {
  5512  			success = "true"
  5513  		}
  5514  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.RemoveAllSessions", success, elapsed)
  5515  	}
  5516  	return resultVar0
  5517  }
  5518  
  5519  func (s *TimerLayerSessionStore) Save(session *model.Session) (*model.Session, error) {
  5520  	start := timemodule.Now()
  5521  
  5522  	resultVar0, resultVar1 := s.SessionStore.Save(session)
  5523  
  5524  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5525  	if s.Root.Metrics != nil {
  5526  		success := "false"
  5527  		if resultVar1 == nil {
  5528  			success = "true"
  5529  		}
  5530  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.Save", success, elapsed)
  5531  	}
  5532  	return resultVar0, resultVar1
  5533  }
  5534  
  5535  func (s *TimerLayerSessionStore) UpdateDeviceId(id string, deviceId string, expiresAt int64) (string, error) {
  5536  	start := timemodule.Now()
  5537  
  5538  	resultVar0, resultVar1 := s.SessionStore.UpdateDeviceId(id, deviceId, expiresAt)
  5539  
  5540  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5541  	if s.Root.Metrics != nil {
  5542  		success := "false"
  5543  		if resultVar1 == nil {
  5544  			success = "true"
  5545  		}
  5546  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.UpdateDeviceId", success, elapsed)
  5547  	}
  5548  	return resultVar0, resultVar1
  5549  }
  5550  
  5551  func (s *TimerLayerSessionStore) UpdateExpiredNotify(sessionid string, notified bool) error {
  5552  	start := timemodule.Now()
  5553  
  5554  	resultVar0 := s.SessionStore.UpdateExpiredNotify(sessionid, notified)
  5555  
  5556  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5557  	if s.Root.Metrics != nil {
  5558  		success := "false"
  5559  		if resultVar0 == nil {
  5560  			success = "true"
  5561  		}
  5562  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.UpdateExpiredNotify", success, elapsed)
  5563  	}
  5564  	return resultVar0
  5565  }
  5566  
  5567  func (s *TimerLayerSessionStore) UpdateExpiresAt(sessionId string, time int64) error {
  5568  	start := timemodule.Now()
  5569  
  5570  	resultVar0 := s.SessionStore.UpdateExpiresAt(sessionId, time)
  5571  
  5572  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5573  	if s.Root.Metrics != nil {
  5574  		success := "false"
  5575  		if resultVar0 == nil {
  5576  			success = "true"
  5577  		}
  5578  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.UpdateExpiresAt", success, elapsed)
  5579  	}
  5580  	return resultVar0
  5581  }
  5582  
  5583  func (s *TimerLayerSessionStore) UpdateLastActivityAt(sessionId string, time int64) error {
  5584  	start := timemodule.Now()
  5585  
  5586  	resultVar0 := s.SessionStore.UpdateLastActivityAt(sessionId, time)
  5587  
  5588  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5589  	if s.Root.Metrics != nil {
  5590  		success := "false"
  5591  		if resultVar0 == nil {
  5592  			success = "true"
  5593  		}
  5594  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.UpdateLastActivityAt", success, elapsed)
  5595  	}
  5596  	return resultVar0
  5597  }
  5598  
  5599  func (s *TimerLayerSessionStore) UpdateProps(session *model.Session) error {
  5600  	start := timemodule.Now()
  5601  
  5602  	resultVar0 := s.SessionStore.UpdateProps(session)
  5603  
  5604  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5605  	if s.Root.Metrics != nil {
  5606  		success := "false"
  5607  		if resultVar0 == nil {
  5608  			success = "true"
  5609  		}
  5610  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.UpdateProps", success, elapsed)
  5611  	}
  5612  	return resultVar0
  5613  }
  5614  
  5615  func (s *TimerLayerSessionStore) UpdateRoles(userId string, roles string) (string, error) {
  5616  	start := timemodule.Now()
  5617  
  5618  	resultVar0, resultVar1 := s.SessionStore.UpdateRoles(userId, roles)
  5619  
  5620  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5621  	if s.Root.Metrics != nil {
  5622  		success := "false"
  5623  		if resultVar1 == nil {
  5624  			success = "true"
  5625  		}
  5626  		s.Root.Metrics.ObserveStoreMethodDuration("SessionStore.UpdateRoles", success, elapsed)
  5627  	}
  5628  	return resultVar0, resultVar1
  5629  }
  5630  
  5631  func (s *TimerLayerStatusStore) Get(userId string) (*model.Status, *model.AppError) {
  5632  	start := timemodule.Now()
  5633  
  5634  	resultVar0, resultVar1 := s.StatusStore.Get(userId)
  5635  
  5636  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5637  	if s.Root.Metrics != nil {
  5638  		success := "false"
  5639  		if resultVar1 == nil {
  5640  			success = "true"
  5641  		}
  5642  		s.Root.Metrics.ObserveStoreMethodDuration("StatusStore.Get", success, elapsed)
  5643  	}
  5644  	return resultVar0, resultVar1
  5645  }
  5646  
  5647  func (s *TimerLayerStatusStore) GetByIds(userIds []string) ([]*model.Status, *model.AppError) {
  5648  	start := timemodule.Now()
  5649  
  5650  	resultVar0, resultVar1 := s.StatusStore.GetByIds(userIds)
  5651  
  5652  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5653  	if s.Root.Metrics != nil {
  5654  		success := "false"
  5655  		if resultVar1 == nil {
  5656  			success = "true"
  5657  		}
  5658  		s.Root.Metrics.ObserveStoreMethodDuration("StatusStore.GetByIds", success, elapsed)
  5659  	}
  5660  	return resultVar0, resultVar1
  5661  }
  5662  
  5663  func (s *TimerLayerStatusStore) GetTotalActiveUsersCount() (int64, *model.AppError) {
  5664  	start := timemodule.Now()
  5665  
  5666  	resultVar0, resultVar1 := s.StatusStore.GetTotalActiveUsersCount()
  5667  
  5668  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5669  	if s.Root.Metrics != nil {
  5670  		success := "false"
  5671  		if resultVar1 == nil {
  5672  			success = "true"
  5673  		}
  5674  		s.Root.Metrics.ObserveStoreMethodDuration("StatusStore.GetTotalActiveUsersCount", success, elapsed)
  5675  	}
  5676  	return resultVar0, resultVar1
  5677  }
  5678  
  5679  func (s *TimerLayerStatusStore) ResetAll() *model.AppError {
  5680  	start := timemodule.Now()
  5681  
  5682  	resultVar0 := s.StatusStore.ResetAll()
  5683  
  5684  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5685  	if s.Root.Metrics != nil {
  5686  		success := "false"
  5687  		if resultVar0 == nil {
  5688  			success = "true"
  5689  		}
  5690  		s.Root.Metrics.ObserveStoreMethodDuration("StatusStore.ResetAll", success, elapsed)
  5691  	}
  5692  	return resultVar0
  5693  }
  5694  
  5695  func (s *TimerLayerStatusStore) SaveOrUpdate(status *model.Status) *model.AppError {
  5696  	start := timemodule.Now()
  5697  
  5698  	resultVar0 := s.StatusStore.SaveOrUpdate(status)
  5699  
  5700  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5701  	if s.Root.Metrics != nil {
  5702  		success := "false"
  5703  		if resultVar0 == nil {
  5704  			success = "true"
  5705  		}
  5706  		s.Root.Metrics.ObserveStoreMethodDuration("StatusStore.SaveOrUpdate", success, elapsed)
  5707  	}
  5708  	return resultVar0
  5709  }
  5710  
  5711  func (s *TimerLayerStatusStore) UpdateLastActivityAt(userId string, lastActivityAt int64) *model.AppError {
  5712  	start := timemodule.Now()
  5713  
  5714  	resultVar0 := s.StatusStore.UpdateLastActivityAt(userId, lastActivityAt)
  5715  
  5716  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5717  	if s.Root.Metrics != nil {
  5718  		success := "false"
  5719  		if resultVar0 == nil {
  5720  			success = "true"
  5721  		}
  5722  		s.Root.Metrics.ObserveStoreMethodDuration("StatusStore.UpdateLastActivityAt", success, elapsed)
  5723  	}
  5724  	return resultVar0
  5725  }
  5726  
  5727  func (s *TimerLayerSystemStore) Get() (model.StringMap, *model.AppError) {
  5728  	start := timemodule.Now()
  5729  
  5730  	resultVar0, resultVar1 := s.SystemStore.Get()
  5731  
  5732  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5733  	if s.Root.Metrics != nil {
  5734  		success := "false"
  5735  		if resultVar1 == nil {
  5736  			success = "true"
  5737  		}
  5738  		s.Root.Metrics.ObserveStoreMethodDuration("SystemStore.Get", success, elapsed)
  5739  	}
  5740  	return resultVar0, resultVar1
  5741  }
  5742  
  5743  func (s *TimerLayerSystemStore) GetByName(name string) (*model.System, *model.AppError) {
  5744  	start := timemodule.Now()
  5745  
  5746  	resultVar0, resultVar1 := s.SystemStore.GetByName(name)
  5747  
  5748  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5749  	if s.Root.Metrics != nil {
  5750  		success := "false"
  5751  		if resultVar1 == nil {
  5752  			success = "true"
  5753  		}
  5754  		s.Root.Metrics.ObserveStoreMethodDuration("SystemStore.GetByName", success, elapsed)
  5755  	}
  5756  	return resultVar0, resultVar1
  5757  }
  5758  
  5759  func (s *TimerLayerSystemStore) InsertIfExists(system *model.System) (*model.System, *model.AppError) {
  5760  	start := timemodule.Now()
  5761  
  5762  	resultVar0, resultVar1 := s.SystemStore.InsertIfExists(system)
  5763  
  5764  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5765  	if s.Root.Metrics != nil {
  5766  		success := "false"
  5767  		if resultVar1 == nil {
  5768  			success = "true"
  5769  		}
  5770  		s.Root.Metrics.ObserveStoreMethodDuration("SystemStore.InsertIfExists", success, elapsed)
  5771  	}
  5772  	return resultVar0, resultVar1
  5773  }
  5774  
  5775  func (s *TimerLayerSystemStore) PermanentDeleteByName(name string) (*model.System, *model.AppError) {
  5776  	start := timemodule.Now()
  5777  
  5778  	resultVar0, resultVar1 := s.SystemStore.PermanentDeleteByName(name)
  5779  
  5780  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5781  	if s.Root.Metrics != nil {
  5782  		success := "false"
  5783  		if resultVar1 == nil {
  5784  			success = "true"
  5785  		}
  5786  		s.Root.Metrics.ObserveStoreMethodDuration("SystemStore.PermanentDeleteByName", success, elapsed)
  5787  	}
  5788  	return resultVar0, resultVar1
  5789  }
  5790  
  5791  func (s *TimerLayerSystemStore) Save(system *model.System) *model.AppError {
  5792  	start := timemodule.Now()
  5793  
  5794  	resultVar0 := s.SystemStore.Save(system)
  5795  
  5796  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5797  	if s.Root.Metrics != nil {
  5798  		success := "false"
  5799  		if resultVar0 == nil {
  5800  			success = "true"
  5801  		}
  5802  		s.Root.Metrics.ObserveStoreMethodDuration("SystemStore.Save", success, elapsed)
  5803  	}
  5804  	return resultVar0
  5805  }
  5806  
  5807  func (s *TimerLayerSystemStore) SaveOrUpdate(system *model.System) *model.AppError {
  5808  	start := timemodule.Now()
  5809  
  5810  	resultVar0 := s.SystemStore.SaveOrUpdate(system)
  5811  
  5812  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5813  	if s.Root.Metrics != nil {
  5814  		success := "false"
  5815  		if resultVar0 == nil {
  5816  			success = "true"
  5817  		}
  5818  		s.Root.Metrics.ObserveStoreMethodDuration("SystemStore.SaveOrUpdate", success, elapsed)
  5819  	}
  5820  	return resultVar0
  5821  }
  5822  
  5823  func (s *TimerLayerSystemStore) Update(system *model.System) *model.AppError {
  5824  	start := timemodule.Now()
  5825  
  5826  	resultVar0 := s.SystemStore.Update(system)
  5827  
  5828  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5829  	if s.Root.Metrics != nil {
  5830  		success := "false"
  5831  		if resultVar0 == nil {
  5832  			success = "true"
  5833  		}
  5834  		s.Root.Metrics.ObserveStoreMethodDuration("SystemStore.Update", success, elapsed)
  5835  	}
  5836  	return resultVar0
  5837  }
  5838  
  5839  func (s *TimerLayerTeamStore) AnalyticsGetTeamCountForScheme(schemeId string) (int64, *model.AppError) {
  5840  	start := timemodule.Now()
  5841  
  5842  	resultVar0, resultVar1 := s.TeamStore.AnalyticsGetTeamCountForScheme(schemeId)
  5843  
  5844  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5845  	if s.Root.Metrics != nil {
  5846  		success := "false"
  5847  		if resultVar1 == nil {
  5848  			success = "true"
  5849  		}
  5850  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.AnalyticsGetTeamCountForScheme", success, elapsed)
  5851  	}
  5852  	return resultVar0, resultVar1
  5853  }
  5854  
  5855  func (s *TimerLayerTeamStore) AnalyticsPrivateTeamCount() (int64, *model.AppError) {
  5856  	start := timemodule.Now()
  5857  
  5858  	resultVar0, resultVar1 := s.TeamStore.AnalyticsPrivateTeamCount()
  5859  
  5860  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5861  	if s.Root.Metrics != nil {
  5862  		success := "false"
  5863  		if resultVar1 == nil {
  5864  			success = "true"
  5865  		}
  5866  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.AnalyticsPrivateTeamCount", success, elapsed)
  5867  	}
  5868  	return resultVar0, resultVar1
  5869  }
  5870  
  5871  func (s *TimerLayerTeamStore) AnalyticsPublicTeamCount() (int64, *model.AppError) {
  5872  	start := timemodule.Now()
  5873  
  5874  	resultVar0, resultVar1 := s.TeamStore.AnalyticsPublicTeamCount()
  5875  
  5876  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5877  	if s.Root.Metrics != nil {
  5878  		success := "false"
  5879  		if resultVar1 == nil {
  5880  			success = "true"
  5881  		}
  5882  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.AnalyticsPublicTeamCount", success, elapsed)
  5883  	}
  5884  	return resultVar0, resultVar1
  5885  }
  5886  
  5887  func (s *TimerLayerTeamStore) AnalyticsTeamCount(includeDeleted bool) (int64, *model.AppError) {
  5888  	start := timemodule.Now()
  5889  
  5890  	resultVar0, resultVar1 := s.TeamStore.AnalyticsTeamCount(includeDeleted)
  5891  
  5892  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5893  	if s.Root.Metrics != nil {
  5894  		success := "false"
  5895  		if resultVar1 == nil {
  5896  			success = "true"
  5897  		}
  5898  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.AnalyticsTeamCount", success, elapsed)
  5899  	}
  5900  	return resultVar0, resultVar1
  5901  }
  5902  
  5903  func (s *TimerLayerTeamStore) ClearAllCustomRoleAssignments() *model.AppError {
  5904  	start := timemodule.Now()
  5905  
  5906  	resultVar0 := s.TeamStore.ClearAllCustomRoleAssignments()
  5907  
  5908  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5909  	if s.Root.Metrics != nil {
  5910  		success := "false"
  5911  		if resultVar0 == nil {
  5912  			success = "true"
  5913  		}
  5914  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.ClearAllCustomRoleAssignments", success, elapsed)
  5915  	}
  5916  	return resultVar0
  5917  }
  5918  
  5919  func (s *TimerLayerTeamStore) ClearCaches() {
  5920  	start := timemodule.Now()
  5921  
  5922  	s.TeamStore.ClearCaches()
  5923  
  5924  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5925  	if s.Root.Metrics != nil {
  5926  		success := "false"
  5927  		if true {
  5928  			success = "true"
  5929  		}
  5930  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.ClearCaches", success, elapsed)
  5931  	}
  5932  }
  5933  
  5934  func (s *TimerLayerTeamStore) Get(id string) (*model.Team, *model.AppError) {
  5935  	start := timemodule.Now()
  5936  
  5937  	resultVar0, resultVar1 := s.TeamStore.Get(id)
  5938  
  5939  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5940  	if s.Root.Metrics != nil {
  5941  		success := "false"
  5942  		if resultVar1 == nil {
  5943  			success = "true"
  5944  		}
  5945  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.Get", success, elapsed)
  5946  	}
  5947  	return resultVar0, resultVar1
  5948  }
  5949  
  5950  func (s *TimerLayerTeamStore) GetActiveMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, *model.AppError) {
  5951  	start := timemodule.Now()
  5952  
  5953  	resultVar0, resultVar1 := s.TeamStore.GetActiveMemberCount(teamId, restrictions)
  5954  
  5955  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5956  	if s.Root.Metrics != nil {
  5957  		success := "false"
  5958  		if resultVar1 == nil {
  5959  			success = "true"
  5960  		}
  5961  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetActiveMemberCount", success, elapsed)
  5962  	}
  5963  	return resultVar0, resultVar1
  5964  }
  5965  
  5966  func (s *TimerLayerTeamStore) GetAll() ([]*model.Team, *model.AppError) {
  5967  	start := timemodule.Now()
  5968  
  5969  	resultVar0, resultVar1 := s.TeamStore.GetAll()
  5970  
  5971  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5972  	if s.Root.Metrics != nil {
  5973  		success := "false"
  5974  		if resultVar1 == nil {
  5975  			success = "true"
  5976  		}
  5977  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetAll", success, elapsed)
  5978  	}
  5979  	return resultVar0, resultVar1
  5980  }
  5981  
  5982  func (s *TimerLayerTeamStore) GetAllForExportAfter(limit int, afterId string) ([]*model.TeamForExport, *model.AppError) {
  5983  	start := timemodule.Now()
  5984  
  5985  	resultVar0, resultVar1 := s.TeamStore.GetAllForExportAfter(limit, afterId)
  5986  
  5987  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  5988  	if s.Root.Metrics != nil {
  5989  		success := "false"
  5990  		if resultVar1 == nil {
  5991  			success = "true"
  5992  		}
  5993  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetAllForExportAfter", success, elapsed)
  5994  	}
  5995  	return resultVar0, resultVar1
  5996  }
  5997  
  5998  func (s *TimerLayerTeamStore) GetAllPage(offset int, limit int) ([]*model.Team, *model.AppError) {
  5999  	start := timemodule.Now()
  6000  
  6001  	resultVar0, resultVar1 := s.TeamStore.GetAllPage(offset, limit)
  6002  
  6003  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6004  	if s.Root.Metrics != nil {
  6005  		success := "false"
  6006  		if resultVar1 == nil {
  6007  			success = "true"
  6008  		}
  6009  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetAllPage", success, elapsed)
  6010  	}
  6011  	return resultVar0, resultVar1
  6012  }
  6013  
  6014  func (s *TimerLayerTeamStore) GetAllPrivateTeamListing() ([]*model.Team, *model.AppError) {
  6015  	start := timemodule.Now()
  6016  
  6017  	resultVar0, resultVar1 := s.TeamStore.GetAllPrivateTeamListing()
  6018  
  6019  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6020  	if s.Root.Metrics != nil {
  6021  		success := "false"
  6022  		if resultVar1 == nil {
  6023  			success = "true"
  6024  		}
  6025  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetAllPrivateTeamListing", success, elapsed)
  6026  	}
  6027  	return resultVar0, resultVar1
  6028  }
  6029  
  6030  func (s *TimerLayerTeamStore) GetAllPrivateTeamPageListing(offset int, limit int) ([]*model.Team, *model.AppError) {
  6031  	start := timemodule.Now()
  6032  
  6033  	resultVar0, resultVar1 := s.TeamStore.GetAllPrivateTeamPageListing(offset, limit)
  6034  
  6035  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6036  	if s.Root.Metrics != nil {
  6037  		success := "false"
  6038  		if resultVar1 == nil {
  6039  			success = "true"
  6040  		}
  6041  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetAllPrivateTeamPageListing", success, elapsed)
  6042  	}
  6043  	return resultVar0, resultVar1
  6044  }
  6045  
  6046  func (s *TimerLayerTeamStore) GetAllPublicTeamPageListing(offset int, limit int) ([]*model.Team, *model.AppError) {
  6047  	start := timemodule.Now()
  6048  
  6049  	resultVar0, resultVar1 := s.TeamStore.GetAllPublicTeamPageListing(offset, limit)
  6050  
  6051  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6052  	if s.Root.Metrics != nil {
  6053  		success := "false"
  6054  		if resultVar1 == nil {
  6055  			success = "true"
  6056  		}
  6057  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetAllPublicTeamPageListing", success, elapsed)
  6058  	}
  6059  	return resultVar0, resultVar1
  6060  }
  6061  
  6062  func (s *TimerLayerTeamStore) GetAllTeamListing() ([]*model.Team, *model.AppError) {
  6063  	start := timemodule.Now()
  6064  
  6065  	resultVar0, resultVar1 := s.TeamStore.GetAllTeamListing()
  6066  
  6067  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6068  	if s.Root.Metrics != nil {
  6069  		success := "false"
  6070  		if resultVar1 == nil {
  6071  			success = "true"
  6072  		}
  6073  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetAllTeamListing", success, elapsed)
  6074  	}
  6075  	return resultVar0, resultVar1
  6076  }
  6077  
  6078  func (s *TimerLayerTeamStore) GetAllTeamPageListing(offset int, limit int) ([]*model.Team, *model.AppError) {
  6079  	start := timemodule.Now()
  6080  
  6081  	resultVar0, resultVar1 := s.TeamStore.GetAllTeamPageListing(offset, limit)
  6082  
  6083  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6084  	if s.Root.Metrics != nil {
  6085  		success := "false"
  6086  		if resultVar1 == nil {
  6087  			success = "true"
  6088  		}
  6089  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetAllTeamPageListing", success, elapsed)
  6090  	}
  6091  	return resultVar0, resultVar1
  6092  }
  6093  
  6094  func (s *TimerLayerTeamStore) GetByInviteId(inviteId string) (*model.Team, *model.AppError) {
  6095  	start := timemodule.Now()
  6096  
  6097  	resultVar0, resultVar1 := s.TeamStore.GetByInviteId(inviteId)
  6098  
  6099  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6100  	if s.Root.Metrics != nil {
  6101  		success := "false"
  6102  		if resultVar1 == nil {
  6103  			success = "true"
  6104  		}
  6105  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetByInviteId", success, elapsed)
  6106  	}
  6107  	return resultVar0, resultVar1
  6108  }
  6109  
  6110  func (s *TimerLayerTeamStore) GetByName(name string) (*model.Team, *model.AppError) {
  6111  	start := timemodule.Now()
  6112  
  6113  	resultVar0, resultVar1 := s.TeamStore.GetByName(name)
  6114  
  6115  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6116  	if s.Root.Metrics != nil {
  6117  		success := "false"
  6118  		if resultVar1 == nil {
  6119  			success = "true"
  6120  		}
  6121  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetByName", success, elapsed)
  6122  	}
  6123  	return resultVar0, resultVar1
  6124  }
  6125  
  6126  func (s *TimerLayerTeamStore) GetByNames(name []string) ([]*model.Team, *model.AppError) {
  6127  	start := timemodule.Now()
  6128  
  6129  	resultVar0, resultVar1 := s.TeamStore.GetByNames(name)
  6130  
  6131  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6132  	if s.Root.Metrics != nil {
  6133  		success := "false"
  6134  		if resultVar1 == nil {
  6135  			success = "true"
  6136  		}
  6137  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetByNames", success, elapsed)
  6138  	}
  6139  	return resultVar0, resultVar1
  6140  }
  6141  
  6142  func (s *TimerLayerTeamStore) GetChannelUnreadsForAllTeams(excludeTeamId string, userId string) ([]*model.ChannelUnread, *model.AppError) {
  6143  	start := timemodule.Now()
  6144  
  6145  	resultVar0, resultVar1 := s.TeamStore.GetChannelUnreadsForAllTeams(excludeTeamId, userId)
  6146  
  6147  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6148  	if s.Root.Metrics != nil {
  6149  		success := "false"
  6150  		if resultVar1 == nil {
  6151  			success = "true"
  6152  		}
  6153  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetChannelUnreadsForAllTeams", success, elapsed)
  6154  	}
  6155  	return resultVar0, resultVar1
  6156  }
  6157  
  6158  func (s *TimerLayerTeamStore) GetChannelUnreadsForTeam(teamId string, userId string) ([]*model.ChannelUnread, *model.AppError) {
  6159  	start := timemodule.Now()
  6160  
  6161  	resultVar0, resultVar1 := s.TeamStore.GetChannelUnreadsForTeam(teamId, userId)
  6162  
  6163  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6164  	if s.Root.Metrics != nil {
  6165  		success := "false"
  6166  		if resultVar1 == nil {
  6167  			success = "true"
  6168  		}
  6169  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetChannelUnreadsForTeam", success, elapsed)
  6170  	}
  6171  	return resultVar0, resultVar1
  6172  }
  6173  
  6174  func (s *TimerLayerTeamStore) GetMember(teamId string, userId string) (*model.TeamMember, *model.AppError) {
  6175  	start := timemodule.Now()
  6176  
  6177  	resultVar0, resultVar1 := s.TeamStore.GetMember(teamId, userId)
  6178  
  6179  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6180  	if s.Root.Metrics != nil {
  6181  		success := "false"
  6182  		if resultVar1 == nil {
  6183  			success = "true"
  6184  		}
  6185  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetMember", success, elapsed)
  6186  	}
  6187  	return resultVar0, resultVar1
  6188  }
  6189  
  6190  func (s *TimerLayerTeamStore) GetMembers(teamId string, offset int, limit int, teamMembersGetOptions *model.TeamMembersGetOptions) ([]*model.TeamMember, *model.AppError) {
  6191  	start := timemodule.Now()
  6192  
  6193  	resultVar0, resultVar1 := s.TeamStore.GetMembers(teamId, offset, limit, teamMembersGetOptions)
  6194  
  6195  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6196  	if s.Root.Metrics != nil {
  6197  		success := "false"
  6198  		if resultVar1 == nil {
  6199  			success = "true"
  6200  		}
  6201  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetMembers", success, elapsed)
  6202  	}
  6203  	return resultVar0, resultVar1
  6204  }
  6205  
  6206  func (s *TimerLayerTeamStore) GetMembersByIds(teamId string, userIds []string, restrictions *model.ViewUsersRestrictions) ([]*model.TeamMember, *model.AppError) {
  6207  	start := timemodule.Now()
  6208  
  6209  	resultVar0, resultVar1 := s.TeamStore.GetMembersByIds(teamId, userIds, restrictions)
  6210  
  6211  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6212  	if s.Root.Metrics != nil {
  6213  		success := "false"
  6214  		if resultVar1 == nil {
  6215  			success = "true"
  6216  		}
  6217  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetMembersByIds", success, elapsed)
  6218  	}
  6219  	return resultVar0, resultVar1
  6220  }
  6221  
  6222  func (s *TimerLayerTeamStore) GetTeamMembersForExport(userId string) ([]*model.TeamMemberForExport, *model.AppError) {
  6223  	start := timemodule.Now()
  6224  
  6225  	resultVar0, resultVar1 := s.TeamStore.GetTeamMembersForExport(userId)
  6226  
  6227  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6228  	if s.Root.Metrics != nil {
  6229  		success := "false"
  6230  		if resultVar1 == nil {
  6231  			success = "true"
  6232  		}
  6233  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetTeamMembersForExport", success, elapsed)
  6234  	}
  6235  	return resultVar0, resultVar1
  6236  }
  6237  
  6238  func (s *TimerLayerTeamStore) GetTeamsByScheme(schemeId string, offset int, limit int) ([]*model.Team, *model.AppError) {
  6239  	start := timemodule.Now()
  6240  
  6241  	resultVar0, resultVar1 := s.TeamStore.GetTeamsByScheme(schemeId, offset, limit)
  6242  
  6243  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6244  	if s.Root.Metrics != nil {
  6245  		success := "false"
  6246  		if resultVar1 == nil {
  6247  			success = "true"
  6248  		}
  6249  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetTeamsByScheme", success, elapsed)
  6250  	}
  6251  	return resultVar0, resultVar1
  6252  }
  6253  
  6254  func (s *TimerLayerTeamStore) GetTeamsByUserId(userId string) ([]*model.Team, *model.AppError) {
  6255  	start := timemodule.Now()
  6256  
  6257  	resultVar0, resultVar1 := s.TeamStore.GetTeamsByUserId(userId)
  6258  
  6259  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6260  	if s.Root.Metrics != nil {
  6261  		success := "false"
  6262  		if resultVar1 == nil {
  6263  			success = "true"
  6264  		}
  6265  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetTeamsByUserId", success, elapsed)
  6266  	}
  6267  	return resultVar0, resultVar1
  6268  }
  6269  
  6270  func (s *TimerLayerTeamStore) GetTeamsForUser(userId string) ([]*model.TeamMember, *model.AppError) {
  6271  	start := timemodule.Now()
  6272  
  6273  	resultVar0, resultVar1 := s.TeamStore.GetTeamsForUser(userId)
  6274  
  6275  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6276  	if s.Root.Metrics != nil {
  6277  		success := "false"
  6278  		if resultVar1 == nil {
  6279  			success = "true"
  6280  		}
  6281  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetTeamsForUser", success, elapsed)
  6282  	}
  6283  	return resultVar0, resultVar1
  6284  }
  6285  
  6286  func (s *TimerLayerTeamStore) GetTeamsForUserWithPagination(userId string, page int, perPage int) ([]*model.TeamMember, *model.AppError) {
  6287  	start := timemodule.Now()
  6288  
  6289  	resultVar0, resultVar1 := s.TeamStore.GetTeamsForUserWithPagination(userId, page, perPage)
  6290  
  6291  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6292  	if s.Root.Metrics != nil {
  6293  		success := "false"
  6294  		if resultVar1 == nil {
  6295  			success = "true"
  6296  		}
  6297  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetTeamsForUserWithPagination", success, elapsed)
  6298  	}
  6299  	return resultVar0, resultVar1
  6300  }
  6301  
  6302  func (s *TimerLayerTeamStore) GetTotalMemberCount(teamId string, restrictions *model.ViewUsersRestrictions) (int64, *model.AppError) {
  6303  	start := timemodule.Now()
  6304  
  6305  	resultVar0, resultVar1 := s.TeamStore.GetTotalMemberCount(teamId, restrictions)
  6306  
  6307  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6308  	if s.Root.Metrics != nil {
  6309  		success := "false"
  6310  		if resultVar1 == nil {
  6311  			success = "true"
  6312  		}
  6313  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetTotalMemberCount", success, elapsed)
  6314  	}
  6315  	return resultVar0, resultVar1
  6316  }
  6317  
  6318  func (s *TimerLayerTeamStore) GetUserTeamIds(userId string, allowFromCache bool) ([]string, *model.AppError) {
  6319  	start := timemodule.Now()
  6320  
  6321  	resultVar0, resultVar1 := s.TeamStore.GetUserTeamIds(userId, allowFromCache)
  6322  
  6323  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6324  	if s.Root.Metrics != nil {
  6325  		success := "false"
  6326  		if resultVar1 == nil {
  6327  			success = "true"
  6328  		}
  6329  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GetUserTeamIds", success, elapsed)
  6330  	}
  6331  	return resultVar0, resultVar1
  6332  }
  6333  
  6334  func (s *TimerLayerTeamStore) GroupSyncedTeamCount() (int64, *model.AppError) {
  6335  	start := timemodule.Now()
  6336  
  6337  	resultVar0, resultVar1 := s.TeamStore.GroupSyncedTeamCount()
  6338  
  6339  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6340  	if s.Root.Metrics != nil {
  6341  		success := "false"
  6342  		if resultVar1 == nil {
  6343  			success = "true"
  6344  		}
  6345  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.GroupSyncedTeamCount", success, elapsed)
  6346  	}
  6347  	return resultVar0, resultVar1
  6348  }
  6349  
  6350  func (s *TimerLayerTeamStore) InvalidateAllTeamIdsForUser(userId string) {
  6351  	start := timemodule.Now()
  6352  
  6353  	s.TeamStore.InvalidateAllTeamIdsForUser(userId)
  6354  
  6355  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6356  	if s.Root.Metrics != nil {
  6357  		success := "false"
  6358  		if true {
  6359  			success = "true"
  6360  		}
  6361  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.InvalidateAllTeamIdsForUser", success, elapsed)
  6362  	}
  6363  }
  6364  
  6365  func (s *TimerLayerTeamStore) MigrateTeamMembers(fromTeamId string, fromUserId string) (map[string]string, *model.AppError) {
  6366  	start := timemodule.Now()
  6367  
  6368  	resultVar0, resultVar1 := s.TeamStore.MigrateTeamMembers(fromTeamId, fromUserId)
  6369  
  6370  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6371  	if s.Root.Metrics != nil {
  6372  		success := "false"
  6373  		if resultVar1 == nil {
  6374  			success = "true"
  6375  		}
  6376  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.MigrateTeamMembers", success, elapsed)
  6377  	}
  6378  	return resultVar0, resultVar1
  6379  }
  6380  
  6381  func (s *TimerLayerTeamStore) PermanentDelete(teamId string) *model.AppError {
  6382  	start := timemodule.Now()
  6383  
  6384  	resultVar0 := s.TeamStore.PermanentDelete(teamId)
  6385  
  6386  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6387  	if s.Root.Metrics != nil {
  6388  		success := "false"
  6389  		if resultVar0 == nil {
  6390  			success = "true"
  6391  		}
  6392  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.PermanentDelete", success, elapsed)
  6393  	}
  6394  	return resultVar0
  6395  }
  6396  
  6397  func (s *TimerLayerTeamStore) RemoveAllMembersByTeam(teamId string) *model.AppError {
  6398  	start := timemodule.Now()
  6399  
  6400  	resultVar0 := s.TeamStore.RemoveAllMembersByTeam(teamId)
  6401  
  6402  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6403  	if s.Root.Metrics != nil {
  6404  		success := "false"
  6405  		if resultVar0 == nil {
  6406  			success = "true"
  6407  		}
  6408  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.RemoveAllMembersByTeam", success, elapsed)
  6409  	}
  6410  	return resultVar0
  6411  }
  6412  
  6413  func (s *TimerLayerTeamStore) RemoveAllMembersByUser(userId string) *model.AppError {
  6414  	start := timemodule.Now()
  6415  
  6416  	resultVar0 := s.TeamStore.RemoveAllMembersByUser(userId)
  6417  
  6418  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6419  	if s.Root.Metrics != nil {
  6420  		success := "false"
  6421  		if resultVar0 == nil {
  6422  			success = "true"
  6423  		}
  6424  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.RemoveAllMembersByUser", success, elapsed)
  6425  	}
  6426  	return resultVar0
  6427  }
  6428  
  6429  func (s *TimerLayerTeamStore) RemoveMember(teamId string, userId string) *model.AppError {
  6430  	start := timemodule.Now()
  6431  
  6432  	resultVar0 := s.TeamStore.RemoveMember(teamId, userId)
  6433  
  6434  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6435  	if s.Root.Metrics != nil {
  6436  		success := "false"
  6437  		if resultVar0 == nil {
  6438  			success = "true"
  6439  		}
  6440  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.RemoveMember", success, elapsed)
  6441  	}
  6442  	return resultVar0
  6443  }
  6444  
  6445  func (s *TimerLayerTeamStore) RemoveMembers(teamId string, userIds []string) *model.AppError {
  6446  	start := timemodule.Now()
  6447  
  6448  	resultVar0 := s.TeamStore.RemoveMembers(teamId, userIds)
  6449  
  6450  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6451  	if s.Root.Metrics != nil {
  6452  		success := "false"
  6453  		if resultVar0 == nil {
  6454  			success = "true"
  6455  		}
  6456  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.RemoveMembers", success, elapsed)
  6457  	}
  6458  	return resultVar0
  6459  }
  6460  
  6461  func (s *TimerLayerTeamStore) ResetAllTeamSchemes() *model.AppError {
  6462  	start := timemodule.Now()
  6463  
  6464  	resultVar0 := s.TeamStore.ResetAllTeamSchemes()
  6465  
  6466  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6467  	if s.Root.Metrics != nil {
  6468  		success := "false"
  6469  		if resultVar0 == nil {
  6470  			success = "true"
  6471  		}
  6472  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.ResetAllTeamSchemes", success, elapsed)
  6473  	}
  6474  	return resultVar0
  6475  }
  6476  
  6477  func (s *TimerLayerTeamStore) Save(team *model.Team) (*model.Team, *model.AppError) {
  6478  	start := timemodule.Now()
  6479  
  6480  	resultVar0, resultVar1 := s.TeamStore.Save(team)
  6481  
  6482  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6483  	if s.Root.Metrics != nil {
  6484  		success := "false"
  6485  		if resultVar1 == nil {
  6486  			success = "true"
  6487  		}
  6488  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.Save", success, elapsed)
  6489  	}
  6490  	return resultVar0, resultVar1
  6491  }
  6492  
  6493  func (s *TimerLayerTeamStore) SaveMember(member *model.TeamMember, maxUsersPerTeam int) (*model.TeamMember, *model.AppError) {
  6494  	start := timemodule.Now()
  6495  
  6496  	resultVar0, resultVar1 := s.TeamStore.SaveMember(member, maxUsersPerTeam)
  6497  
  6498  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6499  	if s.Root.Metrics != nil {
  6500  		success := "false"
  6501  		if resultVar1 == nil {
  6502  			success = "true"
  6503  		}
  6504  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.SaveMember", success, elapsed)
  6505  	}
  6506  	return resultVar0, resultVar1
  6507  }
  6508  
  6509  func (s *TimerLayerTeamStore) SaveMultipleMembers(members []*model.TeamMember, maxUsersPerTeam int) ([]*model.TeamMember, *model.AppError) {
  6510  	start := timemodule.Now()
  6511  
  6512  	resultVar0, resultVar1 := s.TeamStore.SaveMultipleMembers(members, maxUsersPerTeam)
  6513  
  6514  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6515  	if s.Root.Metrics != nil {
  6516  		success := "false"
  6517  		if resultVar1 == nil {
  6518  			success = "true"
  6519  		}
  6520  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.SaveMultipleMembers", success, elapsed)
  6521  	}
  6522  	return resultVar0, resultVar1
  6523  }
  6524  
  6525  func (s *TimerLayerTeamStore) SearchAll(term string, opts *model.TeamSearch) ([]*model.Team, *model.AppError) {
  6526  	start := timemodule.Now()
  6527  
  6528  	resultVar0, resultVar1 := s.TeamStore.SearchAll(term, opts)
  6529  
  6530  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6531  	if s.Root.Metrics != nil {
  6532  		success := "false"
  6533  		if resultVar1 == nil {
  6534  			success = "true"
  6535  		}
  6536  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.SearchAll", success, elapsed)
  6537  	}
  6538  	return resultVar0, resultVar1
  6539  }
  6540  
  6541  func (s *TimerLayerTeamStore) SearchAllPaged(term string, opts *model.TeamSearch) ([]*model.Team, int64, *model.AppError) {
  6542  	start := timemodule.Now()
  6543  
  6544  	resultVar0, resultVar1, resultVar2 := s.TeamStore.SearchAllPaged(term, opts)
  6545  
  6546  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6547  	if s.Root.Metrics != nil {
  6548  		success := "false"
  6549  		if resultVar2 == nil {
  6550  			success = "true"
  6551  		}
  6552  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.SearchAllPaged", success, elapsed)
  6553  	}
  6554  	return resultVar0, resultVar1, resultVar2
  6555  }
  6556  
  6557  func (s *TimerLayerTeamStore) SearchOpen(term string) ([]*model.Team, *model.AppError) {
  6558  	start := timemodule.Now()
  6559  
  6560  	resultVar0, resultVar1 := s.TeamStore.SearchOpen(term)
  6561  
  6562  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6563  	if s.Root.Metrics != nil {
  6564  		success := "false"
  6565  		if resultVar1 == nil {
  6566  			success = "true"
  6567  		}
  6568  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.SearchOpen", success, elapsed)
  6569  	}
  6570  	return resultVar0, resultVar1
  6571  }
  6572  
  6573  func (s *TimerLayerTeamStore) SearchPrivate(term string) ([]*model.Team, *model.AppError) {
  6574  	start := timemodule.Now()
  6575  
  6576  	resultVar0, resultVar1 := s.TeamStore.SearchPrivate(term)
  6577  
  6578  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6579  	if s.Root.Metrics != nil {
  6580  		success := "false"
  6581  		if resultVar1 == nil {
  6582  			success = "true"
  6583  		}
  6584  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.SearchPrivate", success, elapsed)
  6585  	}
  6586  	return resultVar0, resultVar1
  6587  }
  6588  
  6589  func (s *TimerLayerTeamStore) Update(team *model.Team) (*model.Team, *model.AppError) {
  6590  	start := timemodule.Now()
  6591  
  6592  	resultVar0, resultVar1 := s.TeamStore.Update(team)
  6593  
  6594  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6595  	if s.Root.Metrics != nil {
  6596  		success := "false"
  6597  		if resultVar1 == nil {
  6598  			success = "true"
  6599  		}
  6600  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.Update", success, elapsed)
  6601  	}
  6602  	return resultVar0, resultVar1
  6603  }
  6604  
  6605  func (s *TimerLayerTeamStore) UpdateLastTeamIconUpdate(teamId string, curTime int64) *model.AppError {
  6606  	start := timemodule.Now()
  6607  
  6608  	resultVar0 := s.TeamStore.UpdateLastTeamIconUpdate(teamId, curTime)
  6609  
  6610  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6611  	if s.Root.Metrics != nil {
  6612  		success := "false"
  6613  		if resultVar0 == nil {
  6614  			success = "true"
  6615  		}
  6616  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.UpdateLastTeamIconUpdate", success, elapsed)
  6617  	}
  6618  	return resultVar0
  6619  }
  6620  
  6621  func (s *TimerLayerTeamStore) UpdateMember(member *model.TeamMember) (*model.TeamMember, *model.AppError) {
  6622  	start := timemodule.Now()
  6623  
  6624  	resultVar0, resultVar1 := s.TeamStore.UpdateMember(member)
  6625  
  6626  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6627  	if s.Root.Metrics != nil {
  6628  		success := "false"
  6629  		if resultVar1 == nil {
  6630  			success = "true"
  6631  		}
  6632  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.UpdateMember", success, elapsed)
  6633  	}
  6634  	return resultVar0, resultVar1
  6635  }
  6636  
  6637  func (s *TimerLayerTeamStore) UpdateMembersRole(teamID string, userIDs []string) *model.AppError {
  6638  	start := timemodule.Now()
  6639  
  6640  	resultVar0 := s.TeamStore.UpdateMembersRole(teamID, userIDs)
  6641  
  6642  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6643  	if s.Root.Metrics != nil {
  6644  		success := "false"
  6645  		if resultVar0 == nil {
  6646  			success = "true"
  6647  		}
  6648  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.UpdateMembersRole", success, elapsed)
  6649  	}
  6650  	return resultVar0
  6651  }
  6652  
  6653  func (s *TimerLayerTeamStore) UpdateMultipleMembers(members []*model.TeamMember) ([]*model.TeamMember, *model.AppError) {
  6654  	start := timemodule.Now()
  6655  
  6656  	resultVar0, resultVar1 := s.TeamStore.UpdateMultipleMembers(members)
  6657  
  6658  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6659  	if s.Root.Metrics != nil {
  6660  		success := "false"
  6661  		if resultVar1 == nil {
  6662  			success = "true"
  6663  		}
  6664  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.UpdateMultipleMembers", success, elapsed)
  6665  	}
  6666  	return resultVar0, resultVar1
  6667  }
  6668  
  6669  func (s *TimerLayerTeamStore) UserBelongsToTeams(userId string, teamIds []string) (bool, *model.AppError) {
  6670  	start := timemodule.Now()
  6671  
  6672  	resultVar0, resultVar1 := s.TeamStore.UserBelongsToTeams(userId, teamIds)
  6673  
  6674  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6675  	if s.Root.Metrics != nil {
  6676  		success := "false"
  6677  		if resultVar1 == nil {
  6678  			success = "true"
  6679  		}
  6680  		s.Root.Metrics.ObserveStoreMethodDuration("TeamStore.UserBelongsToTeams", success, elapsed)
  6681  	}
  6682  	return resultVar0, resultVar1
  6683  }
  6684  
  6685  func (s *TimerLayerTermsOfServiceStore) Get(id string, allowFromCache bool) (*model.TermsOfService, error) {
  6686  	start := timemodule.Now()
  6687  
  6688  	resultVar0, resultVar1 := s.TermsOfServiceStore.Get(id, allowFromCache)
  6689  
  6690  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6691  	if s.Root.Metrics != nil {
  6692  		success := "false"
  6693  		if resultVar1 == nil {
  6694  			success = "true"
  6695  		}
  6696  		s.Root.Metrics.ObserveStoreMethodDuration("TermsOfServiceStore.Get", success, elapsed)
  6697  	}
  6698  	return resultVar0, resultVar1
  6699  }
  6700  
  6701  func (s *TimerLayerTermsOfServiceStore) GetLatest(allowFromCache bool) (*model.TermsOfService, error) {
  6702  	start := timemodule.Now()
  6703  
  6704  	resultVar0, resultVar1 := s.TermsOfServiceStore.GetLatest(allowFromCache)
  6705  
  6706  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6707  	if s.Root.Metrics != nil {
  6708  		success := "false"
  6709  		if resultVar1 == nil {
  6710  			success = "true"
  6711  		}
  6712  		s.Root.Metrics.ObserveStoreMethodDuration("TermsOfServiceStore.GetLatest", success, elapsed)
  6713  	}
  6714  	return resultVar0, resultVar1
  6715  }
  6716  
  6717  func (s *TimerLayerTermsOfServiceStore) Save(termsOfService *model.TermsOfService) (*model.TermsOfService, error) {
  6718  	start := timemodule.Now()
  6719  
  6720  	resultVar0, resultVar1 := s.TermsOfServiceStore.Save(termsOfService)
  6721  
  6722  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6723  	if s.Root.Metrics != nil {
  6724  		success := "false"
  6725  		if resultVar1 == nil {
  6726  			success = "true"
  6727  		}
  6728  		s.Root.Metrics.ObserveStoreMethodDuration("TermsOfServiceStore.Save", success, elapsed)
  6729  	}
  6730  	return resultVar0, resultVar1
  6731  }
  6732  
  6733  func (s *TimerLayerTokenStore) Cleanup() {
  6734  	start := timemodule.Now()
  6735  
  6736  	s.TokenStore.Cleanup()
  6737  
  6738  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6739  	if s.Root.Metrics != nil {
  6740  		success := "false"
  6741  		if true {
  6742  			success = "true"
  6743  		}
  6744  		s.Root.Metrics.ObserveStoreMethodDuration("TokenStore.Cleanup", success, elapsed)
  6745  	}
  6746  }
  6747  
  6748  func (s *TimerLayerTokenStore) Delete(token string) error {
  6749  	start := timemodule.Now()
  6750  
  6751  	resultVar0 := s.TokenStore.Delete(token)
  6752  
  6753  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6754  	if s.Root.Metrics != nil {
  6755  		success := "false"
  6756  		if resultVar0 == nil {
  6757  			success = "true"
  6758  		}
  6759  		s.Root.Metrics.ObserveStoreMethodDuration("TokenStore.Delete", success, elapsed)
  6760  	}
  6761  	return resultVar0
  6762  }
  6763  
  6764  func (s *TimerLayerTokenStore) GetByToken(token string) (*model.Token, error) {
  6765  	start := timemodule.Now()
  6766  
  6767  	resultVar0, resultVar1 := s.TokenStore.GetByToken(token)
  6768  
  6769  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6770  	if s.Root.Metrics != nil {
  6771  		success := "false"
  6772  		if resultVar1 == nil {
  6773  			success = "true"
  6774  		}
  6775  		s.Root.Metrics.ObserveStoreMethodDuration("TokenStore.GetByToken", success, elapsed)
  6776  	}
  6777  	return resultVar0, resultVar1
  6778  }
  6779  
  6780  func (s *TimerLayerTokenStore) RemoveAllTokensByType(tokenType string) error {
  6781  	start := timemodule.Now()
  6782  
  6783  	resultVar0 := s.TokenStore.RemoveAllTokensByType(tokenType)
  6784  
  6785  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6786  	if s.Root.Metrics != nil {
  6787  		success := "false"
  6788  		if resultVar0 == nil {
  6789  			success = "true"
  6790  		}
  6791  		s.Root.Metrics.ObserveStoreMethodDuration("TokenStore.RemoveAllTokensByType", success, elapsed)
  6792  	}
  6793  	return resultVar0
  6794  }
  6795  
  6796  func (s *TimerLayerTokenStore) Save(recovery *model.Token) error {
  6797  	start := timemodule.Now()
  6798  
  6799  	resultVar0 := s.TokenStore.Save(recovery)
  6800  
  6801  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6802  	if s.Root.Metrics != nil {
  6803  		success := "false"
  6804  		if resultVar0 == nil {
  6805  			success = "true"
  6806  		}
  6807  		s.Root.Metrics.ObserveStoreMethodDuration("TokenStore.Save", success, elapsed)
  6808  	}
  6809  	return resultVar0
  6810  }
  6811  
  6812  func (s *TimerLayerUserStore) AnalyticsActiveCount(time int64, options model.UserCountOptions) (int64, *model.AppError) {
  6813  	start := timemodule.Now()
  6814  
  6815  	resultVar0, resultVar1 := s.UserStore.AnalyticsActiveCount(time, options)
  6816  
  6817  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6818  	if s.Root.Metrics != nil {
  6819  		success := "false"
  6820  		if resultVar1 == nil {
  6821  			success = "true"
  6822  		}
  6823  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.AnalyticsActiveCount", success, elapsed)
  6824  	}
  6825  	return resultVar0, resultVar1
  6826  }
  6827  
  6828  func (s *TimerLayerUserStore) AnalyticsGetGuestCount() (int64, *model.AppError) {
  6829  	start := timemodule.Now()
  6830  
  6831  	resultVar0, resultVar1 := s.UserStore.AnalyticsGetGuestCount()
  6832  
  6833  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6834  	if s.Root.Metrics != nil {
  6835  		success := "false"
  6836  		if resultVar1 == nil {
  6837  			success = "true"
  6838  		}
  6839  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.AnalyticsGetGuestCount", success, elapsed)
  6840  	}
  6841  	return resultVar0, resultVar1
  6842  }
  6843  
  6844  func (s *TimerLayerUserStore) AnalyticsGetInactiveUsersCount() (int64, *model.AppError) {
  6845  	start := timemodule.Now()
  6846  
  6847  	resultVar0, resultVar1 := s.UserStore.AnalyticsGetInactiveUsersCount()
  6848  
  6849  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6850  	if s.Root.Metrics != nil {
  6851  		success := "false"
  6852  		if resultVar1 == nil {
  6853  			success = "true"
  6854  		}
  6855  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.AnalyticsGetInactiveUsersCount", success, elapsed)
  6856  	}
  6857  	return resultVar0, resultVar1
  6858  }
  6859  
  6860  func (s *TimerLayerUserStore) AnalyticsGetSystemAdminCount() (int64, *model.AppError) {
  6861  	start := timemodule.Now()
  6862  
  6863  	resultVar0, resultVar1 := s.UserStore.AnalyticsGetSystemAdminCount()
  6864  
  6865  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6866  	if s.Root.Metrics != nil {
  6867  		success := "false"
  6868  		if resultVar1 == nil {
  6869  			success = "true"
  6870  		}
  6871  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.AnalyticsGetSystemAdminCount", success, elapsed)
  6872  	}
  6873  	return resultVar0, resultVar1
  6874  }
  6875  
  6876  func (s *TimerLayerUserStore) AutocompleteUsersInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) (*model.UserAutocompleteInChannel, *model.AppError) {
  6877  	start := timemodule.Now()
  6878  
  6879  	resultVar0, resultVar1 := s.UserStore.AutocompleteUsersInChannel(teamId, channelId, term, options)
  6880  
  6881  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6882  	if s.Root.Metrics != nil {
  6883  		success := "false"
  6884  		if resultVar1 == nil {
  6885  			success = "true"
  6886  		}
  6887  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.AutocompleteUsersInChannel", success, elapsed)
  6888  	}
  6889  	return resultVar0, resultVar1
  6890  }
  6891  
  6892  func (s *TimerLayerUserStore) ClearAllCustomRoleAssignments() *model.AppError {
  6893  	start := timemodule.Now()
  6894  
  6895  	resultVar0 := s.UserStore.ClearAllCustomRoleAssignments()
  6896  
  6897  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6898  	if s.Root.Metrics != nil {
  6899  		success := "false"
  6900  		if resultVar0 == nil {
  6901  			success = "true"
  6902  		}
  6903  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.ClearAllCustomRoleAssignments", success, elapsed)
  6904  	}
  6905  	return resultVar0
  6906  }
  6907  
  6908  func (s *TimerLayerUserStore) ClearCaches() {
  6909  	start := timemodule.Now()
  6910  
  6911  	s.UserStore.ClearCaches()
  6912  
  6913  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6914  	if s.Root.Metrics != nil {
  6915  		success := "false"
  6916  		if true {
  6917  			success = "true"
  6918  		}
  6919  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.ClearCaches", success, elapsed)
  6920  	}
  6921  }
  6922  
  6923  func (s *TimerLayerUserStore) Count(options model.UserCountOptions) (int64, *model.AppError) {
  6924  	start := timemodule.Now()
  6925  
  6926  	resultVar0, resultVar1 := s.UserStore.Count(options)
  6927  
  6928  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6929  	if s.Root.Metrics != nil {
  6930  		success := "false"
  6931  		if resultVar1 == nil {
  6932  			success = "true"
  6933  		}
  6934  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.Count", success, elapsed)
  6935  	}
  6936  	return resultVar0, resultVar1
  6937  }
  6938  
  6939  func (s *TimerLayerUserStore) DeactivateGuests() ([]string, *model.AppError) {
  6940  	start := timemodule.Now()
  6941  
  6942  	resultVar0, resultVar1 := s.UserStore.DeactivateGuests()
  6943  
  6944  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6945  	if s.Root.Metrics != nil {
  6946  		success := "false"
  6947  		if resultVar1 == nil {
  6948  			success = "true"
  6949  		}
  6950  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.DeactivateGuests", success, elapsed)
  6951  	}
  6952  	return resultVar0, resultVar1
  6953  }
  6954  
  6955  func (s *TimerLayerUserStore) DemoteUserToGuest(userID string) *model.AppError {
  6956  	start := timemodule.Now()
  6957  
  6958  	resultVar0 := s.UserStore.DemoteUserToGuest(userID)
  6959  
  6960  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6961  	if s.Root.Metrics != nil {
  6962  		success := "false"
  6963  		if resultVar0 == nil {
  6964  			success = "true"
  6965  		}
  6966  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.DemoteUserToGuest", success, elapsed)
  6967  	}
  6968  	return resultVar0
  6969  }
  6970  
  6971  func (s *TimerLayerUserStore) Get(id string) (*model.User, *model.AppError) {
  6972  	start := timemodule.Now()
  6973  
  6974  	resultVar0, resultVar1 := s.UserStore.Get(id)
  6975  
  6976  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6977  	if s.Root.Metrics != nil {
  6978  		success := "false"
  6979  		if resultVar1 == nil {
  6980  			success = "true"
  6981  		}
  6982  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.Get", success, elapsed)
  6983  	}
  6984  	return resultVar0, resultVar1
  6985  }
  6986  
  6987  func (s *TimerLayerUserStore) GetAll() ([]*model.User, *model.AppError) {
  6988  	start := timemodule.Now()
  6989  
  6990  	resultVar0, resultVar1 := s.UserStore.GetAll()
  6991  
  6992  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  6993  	if s.Root.Metrics != nil {
  6994  		success := "false"
  6995  		if resultVar1 == nil {
  6996  			success = "true"
  6997  		}
  6998  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetAll", success, elapsed)
  6999  	}
  7000  	return resultVar0, resultVar1
  7001  }
  7002  
  7003  func (s *TimerLayerUserStore) GetAllAfter(limit int, afterId string) ([]*model.User, *model.AppError) {
  7004  	start := timemodule.Now()
  7005  
  7006  	resultVar0, resultVar1 := s.UserStore.GetAllAfter(limit, afterId)
  7007  
  7008  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7009  	if s.Root.Metrics != nil {
  7010  		success := "false"
  7011  		if resultVar1 == nil {
  7012  			success = "true"
  7013  		}
  7014  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetAllAfter", success, elapsed)
  7015  	}
  7016  	return resultVar0, resultVar1
  7017  }
  7018  
  7019  func (s *TimerLayerUserStore) GetAllNotInAuthService(authServices []string) ([]*model.User, *model.AppError) {
  7020  	start := timemodule.Now()
  7021  
  7022  	resultVar0, resultVar1 := s.UserStore.GetAllNotInAuthService(authServices)
  7023  
  7024  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7025  	if s.Root.Metrics != nil {
  7026  		success := "false"
  7027  		if resultVar1 == nil {
  7028  			success = "true"
  7029  		}
  7030  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetAllNotInAuthService", success, elapsed)
  7031  	}
  7032  	return resultVar0, resultVar1
  7033  }
  7034  
  7035  func (s *TimerLayerUserStore) GetAllProfiles(options *model.UserGetOptions) ([]*model.User, *model.AppError) {
  7036  	start := timemodule.Now()
  7037  
  7038  	resultVar0, resultVar1 := s.UserStore.GetAllProfiles(options)
  7039  
  7040  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7041  	if s.Root.Metrics != nil {
  7042  		success := "false"
  7043  		if resultVar1 == nil {
  7044  			success = "true"
  7045  		}
  7046  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetAllProfiles", success, elapsed)
  7047  	}
  7048  	return resultVar0, resultVar1
  7049  }
  7050  
  7051  func (s *TimerLayerUserStore) GetAllProfilesInChannel(channelId string, allowFromCache bool) (map[string]*model.User, *model.AppError) {
  7052  	start := timemodule.Now()
  7053  
  7054  	resultVar0, resultVar1 := s.UserStore.GetAllProfilesInChannel(channelId, allowFromCache)
  7055  
  7056  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7057  	if s.Root.Metrics != nil {
  7058  		success := "false"
  7059  		if resultVar1 == nil {
  7060  			success = "true"
  7061  		}
  7062  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetAllProfilesInChannel", success, elapsed)
  7063  	}
  7064  	return resultVar0, resultVar1
  7065  }
  7066  
  7067  func (s *TimerLayerUserStore) GetAllUsingAuthService(authService string) ([]*model.User, *model.AppError) {
  7068  	start := timemodule.Now()
  7069  
  7070  	resultVar0, resultVar1 := s.UserStore.GetAllUsingAuthService(authService)
  7071  
  7072  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7073  	if s.Root.Metrics != nil {
  7074  		success := "false"
  7075  		if resultVar1 == nil {
  7076  			success = "true"
  7077  		}
  7078  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetAllUsingAuthService", success, elapsed)
  7079  	}
  7080  	return resultVar0, resultVar1
  7081  }
  7082  
  7083  func (s *TimerLayerUserStore) GetAnyUnreadPostCountForChannel(userId string, channelId string) (int64, *model.AppError) {
  7084  	start := timemodule.Now()
  7085  
  7086  	resultVar0, resultVar1 := s.UserStore.GetAnyUnreadPostCountForChannel(userId, channelId)
  7087  
  7088  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7089  	if s.Root.Metrics != nil {
  7090  		success := "false"
  7091  		if resultVar1 == nil {
  7092  			success = "true"
  7093  		}
  7094  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetAnyUnreadPostCountForChannel", success, elapsed)
  7095  	}
  7096  	return resultVar0, resultVar1
  7097  }
  7098  
  7099  func (s *TimerLayerUserStore) GetByAuth(authData *string, authService string) (*model.User, *model.AppError) {
  7100  	start := timemodule.Now()
  7101  
  7102  	resultVar0, resultVar1 := s.UserStore.GetByAuth(authData, authService)
  7103  
  7104  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7105  	if s.Root.Metrics != nil {
  7106  		success := "false"
  7107  		if resultVar1 == nil {
  7108  			success = "true"
  7109  		}
  7110  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetByAuth", success, elapsed)
  7111  	}
  7112  	return resultVar0, resultVar1
  7113  }
  7114  
  7115  func (s *TimerLayerUserStore) GetByEmail(email string) (*model.User, *model.AppError) {
  7116  	start := timemodule.Now()
  7117  
  7118  	resultVar0, resultVar1 := s.UserStore.GetByEmail(email)
  7119  
  7120  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7121  	if s.Root.Metrics != nil {
  7122  		success := "false"
  7123  		if resultVar1 == nil {
  7124  			success = "true"
  7125  		}
  7126  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetByEmail", success, elapsed)
  7127  	}
  7128  	return resultVar0, resultVar1
  7129  }
  7130  
  7131  func (s *TimerLayerUserStore) GetByUsername(username string) (*model.User, *model.AppError) {
  7132  	start := timemodule.Now()
  7133  
  7134  	resultVar0, resultVar1 := s.UserStore.GetByUsername(username)
  7135  
  7136  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7137  	if s.Root.Metrics != nil {
  7138  		success := "false"
  7139  		if resultVar1 == nil {
  7140  			success = "true"
  7141  		}
  7142  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetByUsername", success, elapsed)
  7143  	}
  7144  	return resultVar0, resultVar1
  7145  }
  7146  
  7147  func (s *TimerLayerUserStore) GetChannelGroupUsers(channelID string) ([]*model.User, *model.AppError) {
  7148  	start := timemodule.Now()
  7149  
  7150  	resultVar0, resultVar1 := s.UserStore.GetChannelGroupUsers(channelID)
  7151  
  7152  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7153  	if s.Root.Metrics != nil {
  7154  		success := "false"
  7155  		if resultVar1 == nil {
  7156  			success = "true"
  7157  		}
  7158  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetChannelGroupUsers", success, elapsed)
  7159  	}
  7160  	return resultVar0, resultVar1
  7161  }
  7162  
  7163  func (s *TimerLayerUserStore) GetEtagForAllProfiles() string {
  7164  	start := timemodule.Now()
  7165  
  7166  	resultVar0 := s.UserStore.GetEtagForAllProfiles()
  7167  
  7168  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7169  	if s.Root.Metrics != nil {
  7170  		success := "false"
  7171  		if true {
  7172  			success = "true"
  7173  		}
  7174  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetEtagForAllProfiles", success, elapsed)
  7175  	}
  7176  	return resultVar0
  7177  }
  7178  
  7179  func (s *TimerLayerUserStore) GetEtagForProfiles(teamId string) string {
  7180  	start := timemodule.Now()
  7181  
  7182  	resultVar0 := s.UserStore.GetEtagForProfiles(teamId)
  7183  
  7184  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7185  	if s.Root.Metrics != nil {
  7186  		success := "false"
  7187  		if true {
  7188  			success = "true"
  7189  		}
  7190  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetEtagForProfiles", success, elapsed)
  7191  	}
  7192  	return resultVar0
  7193  }
  7194  
  7195  func (s *TimerLayerUserStore) GetEtagForProfilesNotInTeam(teamId string) string {
  7196  	start := timemodule.Now()
  7197  
  7198  	resultVar0 := s.UserStore.GetEtagForProfilesNotInTeam(teamId)
  7199  
  7200  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7201  	if s.Root.Metrics != nil {
  7202  		success := "false"
  7203  		if true {
  7204  			success = "true"
  7205  		}
  7206  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetEtagForProfilesNotInTeam", success, elapsed)
  7207  	}
  7208  	return resultVar0
  7209  }
  7210  
  7211  func (s *TimerLayerUserStore) GetForLogin(loginId string, allowSignInWithUsername bool, allowSignInWithEmail bool) (*model.User, *model.AppError) {
  7212  	start := timemodule.Now()
  7213  
  7214  	resultVar0, resultVar1 := s.UserStore.GetForLogin(loginId, allowSignInWithUsername, allowSignInWithEmail)
  7215  
  7216  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7217  	if s.Root.Metrics != nil {
  7218  		success := "false"
  7219  		if resultVar1 == nil {
  7220  			success = "true"
  7221  		}
  7222  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetForLogin", success, elapsed)
  7223  	}
  7224  	return resultVar0, resultVar1
  7225  }
  7226  
  7227  func (s *TimerLayerUserStore) GetKnownUsers(userID string) ([]string, *model.AppError) {
  7228  	start := timemodule.Now()
  7229  
  7230  	resultVar0, resultVar1 := s.UserStore.GetKnownUsers(userID)
  7231  
  7232  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7233  	if s.Root.Metrics != nil {
  7234  		success := "false"
  7235  		if resultVar1 == nil {
  7236  			success = "true"
  7237  		}
  7238  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetKnownUsers", success, elapsed)
  7239  	}
  7240  	return resultVar0, resultVar1
  7241  }
  7242  
  7243  func (s *TimerLayerUserStore) GetNewUsersForTeam(teamId string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) {
  7244  	start := timemodule.Now()
  7245  
  7246  	resultVar0, resultVar1 := s.UserStore.GetNewUsersForTeam(teamId, offset, limit, viewRestrictions)
  7247  
  7248  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7249  	if s.Root.Metrics != nil {
  7250  		success := "false"
  7251  		if resultVar1 == nil {
  7252  			success = "true"
  7253  		}
  7254  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetNewUsersForTeam", success, elapsed)
  7255  	}
  7256  	return resultVar0, resultVar1
  7257  }
  7258  
  7259  func (s *TimerLayerUserStore) GetProfileByGroupChannelIdsForUser(userId string, channelIds []string) (map[string][]*model.User, *model.AppError) {
  7260  	start := timemodule.Now()
  7261  
  7262  	resultVar0, resultVar1 := s.UserStore.GetProfileByGroupChannelIdsForUser(userId, channelIds)
  7263  
  7264  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7265  	if s.Root.Metrics != nil {
  7266  		success := "false"
  7267  		if resultVar1 == nil {
  7268  			success = "true"
  7269  		}
  7270  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetProfileByGroupChannelIdsForUser", success, elapsed)
  7271  	}
  7272  	return resultVar0, resultVar1
  7273  }
  7274  
  7275  func (s *TimerLayerUserStore) GetProfileByIds(userIds []string, options *store.UserGetByIdsOpts, allowFromCache bool) ([]*model.User, *model.AppError) {
  7276  	start := timemodule.Now()
  7277  
  7278  	resultVar0, resultVar1 := s.UserStore.GetProfileByIds(userIds, options, allowFromCache)
  7279  
  7280  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7281  	if s.Root.Metrics != nil {
  7282  		success := "false"
  7283  		if resultVar1 == nil {
  7284  			success = "true"
  7285  		}
  7286  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetProfileByIds", success, elapsed)
  7287  	}
  7288  	return resultVar0, resultVar1
  7289  }
  7290  
  7291  func (s *TimerLayerUserStore) GetProfiles(options *model.UserGetOptions) ([]*model.User, *model.AppError) {
  7292  	start := timemodule.Now()
  7293  
  7294  	resultVar0, resultVar1 := s.UserStore.GetProfiles(options)
  7295  
  7296  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7297  	if s.Root.Metrics != nil {
  7298  		success := "false"
  7299  		if resultVar1 == nil {
  7300  			success = "true"
  7301  		}
  7302  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetProfiles", success, elapsed)
  7303  	}
  7304  	return resultVar0, resultVar1
  7305  }
  7306  
  7307  func (s *TimerLayerUserStore) GetProfilesByUsernames(usernames []string, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) {
  7308  	start := timemodule.Now()
  7309  
  7310  	resultVar0, resultVar1 := s.UserStore.GetProfilesByUsernames(usernames, viewRestrictions)
  7311  
  7312  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7313  	if s.Root.Metrics != nil {
  7314  		success := "false"
  7315  		if resultVar1 == nil {
  7316  			success = "true"
  7317  		}
  7318  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetProfilesByUsernames", success, elapsed)
  7319  	}
  7320  	return resultVar0, resultVar1
  7321  }
  7322  
  7323  func (s *TimerLayerUserStore) GetProfilesInChannel(channelId string, offset int, limit int) ([]*model.User, *model.AppError) {
  7324  	start := timemodule.Now()
  7325  
  7326  	resultVar0, resultVar1 := s.UserStore.GetProfilesInChannel(channelId, offset, limit)
  7327  
  7328  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7329  	if s.Root.Metrics != nil {
  7330  		success := "false"
  7331  		if resultVar1 == nil {
  7332  			success = "true"
  7333  		}
  7334  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetProfilesInChannel", success, elapsed)
  7335  	}
  7336  	return resultVar0, resultVar1
  7337  }
  7338  
  7339  func (s *TimerLayerUserStore) GetProfilesInChannelByStatus(channelId string, offset int, limit int) ([]*model.User, *model.AppError) {
  7340  	start := timemodule.Now()
  7341  
  7342  	resultVar0, resultVar1 := s.UserStore.GetProfilesInChannelByStatus(channelId, offset, limit)
  7343  
  7344  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7345  	if s.Root.Metrics != nil {
  7346  		success := "false"
  7347  		if resultVar1 == nil {
  7348  			success = "true"
  7349  		}
  7350  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetProfilesInChannelByStatus", success, elapsed)
  7351  	}
  7352  	return resultVar0, resultVar1
  7353  }
  7354  
  7355  func (s *TimerLayerUserStore) GetProfilesNotInChannel(teamId string, channelId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) {
  7356  	start := timemodule.Now()
  7357  
  7358  	resultVar0, resultVar1 := s.UserStore.GetProfilesNotInChannel(teamId, channelId, groupConstrained, offset, limit, viewRestrictions)
  7359  
  7360  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7361  	if s.Root.Metrics != nil {
  7362  		success := "false"
  7363  		if resultVar1 == nil {
  7364  			success = "true"
  7365  		}
  7366  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetProfilesNotInChannel", success, elapsed)
  7367  	}
  7368  	return resultVar0, resultVar1
  7369  }
  7370  
  7371  func (s *TimerLayerUserStore) GetProfilesNotInTeam(teamId string, groupConstrained bool, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) {
  7372  	start := timemodule.Now()
  7373  
  7374  	resultVar0, resultVar1 := s.UserStore.GetProfilesNotInTeam(teamId, groupConstrained, offset, limit, viewRestrictions)
  7375  
  7376  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7377  	if s.Root.Metrics != nil {
  7378  		success := "false"
  7379  		if resultVar1 == nil {
  7380  			success = "true"
  7381  		}
  7382  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetProfilesNotInTeam", success, elapsed)
  7383  	}
  7384  	return resultVar0, resultVar1
  7385  }
  7386  
  7387  func (s *TimerLayerUserStore) GetProfilesWithoutTeam(options *model.UserGetOptions) ([]*model.User, *model.AppError) {
  7388  	start := timemodule.Now()
  7389  
  7390  	resultVar0, resultVar1 := s.UserStore.GetProfilesWithoutTeam(options)
  7391  
  7392  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7393  	if s.Root.Metrics != nil {
  7394  		success := "false"
  7395  		if resultVar1 == nil {
  7396  			success = "true"
  7397  		}
  7398  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetProfilesWithoutTeam", success, elapsed)
  7399  	}
  7400  	return resultVar0, resultVar1
  7401  }
  7402  
  7403  func (s *TimerLayerUserStore) GetRecentlyActiveUsersForTeam(teamId string, offset int, limit int, viewRestrictions *model.ViewUsersRestrictions) ([]*model.User, *model.AppError) {
  7404  	start := timemodule.Now()
  7405  
  7406  	resultVar0, resultVar1 := s.UserStore.GetRecentlyActiveUsersForTeam(teamId, offset, limit, viewRestrictions)
  7407  
  7408  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7409  	if s.Root.Metrics != nil {
  7410  		success := "false"
  7411  		if resultVar1 == nil {
  7412  			success = "true"
  7413  		}
  7414  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetRecentlyActiveUsersForTeam", success, elapsed)
  7415  	}
  7416  	return resultVar0, resultVar1
  7417  }
  7418  
  7419  func (s *TimerLayerUserStore) GetSystemAdminProfiles() (map[string]*model.User, *model.AppError) {
  7420  	start := timemodule.Now()
  7421  
  7422  	resultVar0, resultVar1 := s.UserStore.GetSystemAdminProfiles()
  7423  
  7424  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7425  	if s.Root.Metrics != nil {
  7426  		success := "false"
  7427  		if resultVar1 == nil {
  7428  			success = "true"
  7429  		}
  7430  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetSystemAdminProfiles", success, elapsed)
  7431  	}
  7432  	return resultVar0, resultVar1
  7433  }
  7434  
  7435  func (s *TimerLayerUserStore) GetTeamGroupUsers(teamID string) ([]*model.User, *model.AppError) {
  7436  	start := timemodule.Now()
  7437  
  7438  	resultVar0, resultVar1 := s.UserStore.GetTeamGroupUsers(teamID)
  7439  
  7440  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7441  	if s.Root.Metrics != nil {
  7442  		success := "false"
  7443  		if resultVar1 == nil {
  7444  			success = "true"
  7445  		}
  7446  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetTeamGroupUsers", success, elapsed)
  7447  	}
  7448  	return resultVar0, resultVar1
  7449  }
  7450  
  7451  func (s *TimerLayerUserStore) GetUnreadCount(userId string) (int64, *model.AppError) {
  7452  	start := timemodule.Now()
  7453  
  7454  	resultVar0, resultVar1 := s.UserStore.GetUnreadCount(userId)
  7455  
  7456  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7457  	if s.Root.Metrics != nil {
  7458  		success := "false"
  7459  		if resultVar1 == nil {
  7460  			success = "true"
  7461  		}
  7462  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetUnreadCount", success, elapsed)
  7463  	}
  7464  	return resultVar0, resultVar1
  7465  }
  7466  
  7467  func (s *TimerLayerUserStore) GetUnreadCountForChannel(userId string, channelId string) (int64, *model.AppError) {
  7468  	start := timemodule.Now()
  7469  
  7470  	resultVar0, resultVar1 := s.UserStore.GetUnreadCountForChannel(userId, channelId)
  7471  
  7472  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7473  	if s.Root.Metrics != nil {
  7474  		success := "false"
  7475  		if resultVar1 == nil {
  7476  			success = "true"
  7477  		}
  7478  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetUnreadCountForChannel", success, elapsed)
  7479  	}
  7480  	return resultVar0, resultVar1
  7481  }
  7482  
  7483  func (s *TimerLayerUserStore) GetUsersBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.UserForIndexing, *model.AppError) {
  7484  	start := timemodule.Now()
  7485  
  7486  	resultVar0, resultVar1 := s.UserStore.GetUsersBatchForIndexing(startTime, endTime, limit)
  7487  
  7488  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7489  	if s.Root.Metrics != nil {
  7490  		success := "false"
  7491  		if resultVar1 == nil {
  7492  			success = "true"
  7493  		}
  7494  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.GetUsersBatchForIndexing", success, elapsed)
  7495  	}
  7496  	return resultVar0, resultVar1
  7497  }
  7498  
  7499  func (s *TimerLayerUserStore) InferSystemInstallDate() (int64, *model.AppError) {
  7500  	start := timemodule.Now()
  7501  
  7502  	resultVar0, resultVar1 := s.UserStore.InferSystemInstallDate()
  7503  
  7504  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7505  	if s.Root.Metrics != nil {
  7506  		success := "false"
  7507  		if resultVar1 == nil {
  7508  			success = "true"
  7509  		}
  7510  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.InferSystemInstallDate", success, elapsed)
  7511  	}
  7512  	return resultVar0, resultVar1
  7513  }
  7514  
  7515  func (s *TimerLayerUserStore) InvalidateProfileCacheForUser(userId string) {
  7516  	start := timemodule.Now()
  7517  
  7518  	s.UserStore.InvalidateProfileCacheForUser(userId)
  7519  
  7520  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7521  	if s.Root.Metrics != nil {
  7522  		success := "false"
  7523  		if true {
  7524  			success = "true"
  7525  		}
  7526  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.InvalidateProfileCacheForUser", success, elapsed)
  7527  	}
  7528  }
  7529  
  7530  func (s *TimerLayerUserStore) InvalidateProfilesInChannelCache(channelId string) {
  7531  	start := timemodule.Now()
  7532  
  7533  	s.UserStore.InvalidateProfilesInChannelCache(channelId)
  7534  
  7535  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7536  	if s.Root.Metrics != nil {
  7537  		success := "false"
  7538  		if true {
  7539  			success = "true"
  7540  		}
  7541  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.InvalidateProfilesInChannelCache", success, elapsed)
  7542  	}
  7543  }
  7544  
  7545  func (s *TimerLayerUserStore) InvalidateProfilesInChannelCacheByUser(userId string) {
  7546  	start := timemodule.Now()
  7547  
  7548  	s.UserStore.InvalidateProfilesInChannelCacheByUser(userId)
  7549  
  7550  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7551  	if s.Root.Metrics != nil {
  7552  		success := "false"
  7553  		if true {
  7554  			success = "true"
  7555  		}
  7556  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.InvalidateProfilesInChannelCacheByUser", success, elapsed)
  7557  	}
  7558  }
  7559  
  7560  func (s *TimerLayerUserStore) PermanentDelete(userId string) *model.AppError {
  7561  	start := timemodule.Now()
  7562  
  7563  	resultVar0 := s.UserStore.PermanentDelete(userId)
  7564  
  7565  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7566  	if s.Root.Metrics != nil {
  7567  		success := "false"
  7568  		if resultVar0 == nil {
  7569  			success = "true"
  7570  		}
  7571  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.PermanentDelete", success, elapsed)
  7572  	}
  7573  	return resultVar0
  7574  }
  7575  
  7576  func (s *TimerLayerUserStore) PromoteGuestToUser(userID string) *model.AppError {
  7577  	start := timemodule.Now()
  7578  
  7579  	resultVar0 := s.UserStore.PromoteGuestToUser(userID)
  7580  
  7581  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7582  	if s.Root.Metrics != nil {
  7583  		success := "false"
  7584  		if resultVar0 == nil {
  7585  			success = "true"
  7586  		}
  7587  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.PromoteGuestToUser", success, elapsed)
  7588  	}
  7589  	return resultVar0
  7590  }
  7591  
  7592  func (s *TimerLayerUserStore) ResetLastPictureUpdate(userId string) *model.AppError {
  7593  	start := timemodule.Now()
  7594  
  7595  	resultVar0 := s.UserStore.ResetLastPictureUpdate(userId)
  7596  
  7597  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7598  	if s.Root.Metrics != nil {
  7599  		success := "false"
  7600  		if resultVar0 == nil {
  7601  			success = "true"
  7602  		}
  7603  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.ResetLastPictureUpdate", success, elapsed)
  7604  	}
  7605  	return resultVar0
  7606  }
  7607  
  7608  func (s *TimerLayerUserStore) Save(user *model.User) (*model.User, *model.AppError) {
  7609  	start := timemodule.Now()
  7610  
  7611  	resultVar0, resultVar1 := s.UserStore.Save(user)
  7612  
  7613  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7614  	if s.Root.Metrics != nil {
  7615  		success := "false"
  7616  		if resultVar1 == nil {
  7617  			success = "true"
  7618  		}
  7619  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.Save", success, elapsed)
  7620  	}
  7621  	return resultVar0, resultVar1
  7622  }
  7623  
  7624  func (s *TimerLayerUserStore) Search(teamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) {
  7625  	start := timemodule.Now()
  7626  
  7627  	resultVar0, resultVar1 := s.UserStore.Search(teamId, term, options)
  7628  
  7629  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7630  	if s.Root.Metrics != nil {
  7631  		success := "false"
  7632  		if resultVar1 == nil {
  7633  			success = "true"
  7634  		}
  7635  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.Search", success, elapsed)
  7636  	}
  7637  	return resultVar0, resultVar1
  7638  }
  7639  
  7640  func (s *TimerLayerUserStore) SearchInChannel(channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) {
  7641  	start := timemodule.Now()
  7642  
  7643  	resultVar0, resultVar1 := s.UserStore.SearchInChannel(channelId, term, options)
  7644  
  7645  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7646  	if s.Root.Metrics != nil {
  7647  		success := "false"
  7648  		if resultVar1 == nil {
  7649  			success = "true"
  7650  		}
  7651  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.SearchInChannel", success, elapsed)
  7652  	}
  7653  	return resultVar0, resultVar1
  7654  }
  7655  
  7656  func (s *TimerLayerUserStore) SearchInGroup(groupID string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) {
  7657  	start := timemodule.Now()
  7658  
  7659  	resultVar0, resultVar1 := s.UserStore.SearchInGroup(groupID, term, options)
  7660  
  7661  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7662  	if s.Root.Metrics != nil {
  7663  		success := "false"
  7664  		if resultVar1 == nil {
  7665  			success = "true"
  7666  		}
  7667  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.SearchInGroup", success, elapsed)
  7668  	}
  7669  	return resultVar0, resultVar1
  7670  }
  7671  
  7672  func (s *TimerLayerUserStore) SearchNotInChannel(teamId string, channelId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) {
  7673  	start := timemodule.Now()
  7674  
  7675  	resultVar0, resultVar1 := s.UserStore.SearchNotInChannel(teamId, channelId, term, options)
  7676  
  7677  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7678  	if s.Root.Metrics != nil {
  7679  		success := "false"
  7680  		if resultVar1 == nil {
  7681  			success = "true"
  7682  		}
  7683  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.SearchNotInChannel", success, elapsed)
  7684  	}
  7685  	return resultVar0, resultVar1
  7686  }
  7687  
  7688  func (s *TimerLayerUserStore) SearchNotInTeam(notInTeamId string, term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) {
  7689  	start := timemodule.Now()
  7690  
  7691  	resultVar0, resultVar1 := s.UserStore.SearchNotInTeam(notInTeamId, term, options)
  7692  
  7693  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7694  	if s.Root.Metrics != nil {
  7695  		success := "false"
  7696  		if resultVar1 == nil {
  7697  			success = "true"
  7698  		}
  7699  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.SearchNotInTeam", success, elapsed)
  7700  	}
  7701  	return resultVar0, resultVar1
  7702  }
  7703  
  7704  func (s *TimerLayerUserStore) SearchWithoutTeam(term string, options *model.UserSearchOptions) ([]*model.User, *model.AppError) {
  7705  	start := timemodule.Now()
  7706  
  7707  	resultVar0, resultVar1 := s.UserStore.SearchWithoutTeam(term, options)
  7708  
  7709  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7710  	if s.Root.Metrics != nil {
  7711  		success := "false"
  7712  		if resultVar1 == nil {
  7713  			success = "true"
  7714  		}
  7715  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.SearchWithoutTeam", success, elapsed)
  7716  	}
  7717  	return resultVar0, resultVar1
  7718  }
  7719  
  7720  func (s *TimerLayerUserStore) Update(user *model.User, allowRoleUpdate bool) (*model.UserUpdate, *model.AppError) {
  7721  	start := timemodule.Now()
  7722  
  7723  	resultVar0, resultVar1 := s.UserStore.Update(user, allowRoleUpdate)
  7724  
  7725  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7726  	if s.Root.Metrics != nil {
  7727  		success := "false"
  7728  		if resultVar1 == nil {
  7729  			success = "true"
  7730  		}
  7731  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.Update", success, elapsed)
  7732  	}
  7733  	return resultVar0, resultVar1
  7734  }
  7735  
  7736  func (s *TimerLayerUserStore) UpdateAuthData(userId string, service string, authData *string, email string, resetMfa bool) (string, *model.AppError) {
  7737  	start := timemodule.Now()
  7738  
  7739  	resultVar0, resultVar1 := s.UserStore.UpdateAuthData(userId, service, authData, email, resetMfa)
  7740  
  7741  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7742  	if s.Root.Metrics != nil {
  7743  		success := "false"
  7744  		if resultVar1 == nil {
  7745  			success = "true"
  7746  		}
  7747  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.UpdateAuthData", success, elapsed)
  7748  	}
  7749  	return resultVar0, resultVar1
  7750  }
  7751  
  7752  func (s *TimerLayerUserStore) UpdateFailedPasswordAttempts(userId string, attempts int) *model.AppError {
  7753  	start := timemodule.Now()
  7754  
  7755  	resultVar0 := s.UserStore.UpdateFailedPasswordAttempts(userId, attempts)
  7756  
  7757  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7758  	if s.Root.Metrics != nil {
  7759  		success := "false"
  7760  		if resultVar0 == nil {
  7761  			success = "true"
  7762  		}
  7763  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.UpdateFailedPasswordAttempts", success, elapsed)
  7764  	}
  7765  	return resultVar0
  7766  }
  7767  
  7768  func (s *TimerLayerUserStore) UpdateLastPictureUpdate(userId string) *model.AppError {
  7769  	start := timemodule.Now()
  7770  
  7771  	resultVar0 := s.UserStore.UpdateLastPictureUpdate(userId)
  7772  
  7773  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7774  	if s.Root.Metrics != nil {
  7775  		success := "false"
  7776  		if resultVar0 == nil {
  7777  			success = "true"
  7778  		}
  7779  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.UpdateLastPictureUpdate", success, elapsed)
  7780  	}
  7781  	return resultVar0
  7782  }
  7783  
  7784  func (s *TimerLayerUserStore) UpdateMfaActive(userId string, active bool) *model.AppError {
  7785  	start := timemodule.Now()
  7786  
  7787  	resultVar0 := s.UserStore.UpdateMfaActive(userId, active)
  7788  
  7789  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7790  	if s.Root.Metrics != nil {
  7791  		success := "false"
  7792  		if resultVar0 == nil {
  7793  			success = "true"
  7794  		}
  7795  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.UpdateMfaActive", success, elapsed)
  7796  	}
  7797  	return resultVar0
  7798  }
  7799  
  7800  func (s *TimerLayerUserStore) UpdateMfaSecret(userId string, secret string) *model.AppError {
  7801  	start := timemodule.Now()
  7802  
  7803  	resultVar0 := s.UserStore.UpdateMfaSecret(userId, secret)
  7804  
  7805  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7806  	if s.Root.Metrics != nil {
  7807  		success := "false"
  7808  		if resultVar0 == nil {
  7809  			success = "true"
  7810  		}
  7811  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.UpdateMfaSecret", success, elapsed)
  7812  	}
  7813  	return resultVar0
  7814  }
  7815  
  7816  func (s *TimerLayerUserStore) UpdatePassword(userId string, newPassword string) *model.AppError {
  7817  	start := timemodule.Now()
  7818  
  7819  	resultVar0 := s.UserStore.UpdatePassword(userId, newPassword)
  7820  
  7821  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7822  	if s.Root.Metrics != nil {
  7823  		success := "false"
  7824  		if resultVar0 == nil {
  7825  			success = "true"
  7826  		}
  7827  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.UpdatePassword", success, elapsed)
  7828  	}
  7829  	return resultVar0
  7830  }
  7831  
  7832  func (s *TimerLayerUserStore) UpdateUpdateAt(userId string) (int64, *model.AppError) {
  7833  	start := timemodule.Now()
  7834  
  7835  	resultVar0, resultVar1 := s.UserStore.UpdateUpdateAt(userId)
  7836  
  7837  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7838  	if s.Root.Metrics != nil {
  7839  		success := "false"
  7840  		if resultVar1 == nil {
  7841  			success = "true"
  7842  		}
  7843  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.UpdateUpdateAt", success, elapsed)
  7844  	}
  7845  	return resultVar0, resultVar1
  7846  }
  7847  
  7848  func (s *TimerLayerUserStore) VerifyEmail(userId string, email string) (string, *model.AppError) {
  7849  	start := timemodule.Now()
  7850  
  7851  	resultVar0, resultVar1 := s.UserStore.VerifyEmail(userId, email)
  7852  
  7853  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7854  	if s.Root.Metrics != nil {
  7855  		success := "false"
  7856  		if resultVar1 == nil {
  7857  			success = "true"
  7858  		}
  7859  		s.Root.Metrics.ObserveStoreMethodDuration("UserStore.VerifyEmail", success, elapsed)
  7860  	}
  7861  	return resultVar0, resultVar1
  7862  }
  7863  
  7864  func (s *TimerLayerUserAccessTokenStore) Delete(tokenId string) error {
  7865  	start := timemodule.Now()
  7866  
  7867  	resultVar0 := s.UserAccessTokenStore.Delete(tokenId)
  7868  
  7869  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7870  	if s.Root.Metrics != nil {
  7871  		success := "false"
  7872  		if resultVar0 == nil {
  7873  			success = "true"
  7874  		}
  7875  		s.Root.Metrics.ObserveStoreMethodDuration("UserAccessTokenStore.Delete", success, elapsed)
  7876  	}
  7877  	return resultVar0
  7878  }
  7879  
  7880  func (s *TimerLayerUserAccessTokenStore) DeleteAllForUser(userId string) error {
  7881  	start := timemodule.Now()
  7882  
  7883  	resultVar0 := s.UserAccessTokenStore.DeleteAllForUser(userId)
  7884  
  7885  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7886  	if s.Root.Metrics != nil {
  7887  		success := "false"
  7888  		if resultVar0 == nil {
  7889  			success = "true"
  7890  		}
  7891  		s.Root.Metrics.ObserveStoreMethodDuration("UserAccessTokenStore.DeleteAllForUser", success, elapsed)
  7892  	}
  7893  	return resultVar0
  7894  }
  7895  
  7896  func (s *TimerLayerUserAccessTokenStore) Get(tokenId string) (*model.UserAccessToken, error) {
  7897  	start := timemodule.Now()
  7898  
  7899  	resultVar0, resultVar1 := s.UserAccessTokenStore.Get(tokenId)
  7900  
  7901  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7902  	if s.Root.Metrics != nil {
  7903  		success := "false"
  7904  		if resultVar1 == nil {
  7905  			success = "true"
  7906  		}
  7907  		s.Root.Metrics.ObserveStoreMethodDuration("UserAccessTokenStore.Get", success, elapsed)
  7908  	}
  7909  	return resultVar0, resultVar1
  7910  }
  7911  
  7912  func (s *TimerLayerUserAccessTokenStore) GetAll(offset int, limit int) ([]*model.UserAccessToken, error) {
  7913  	start := timemodule.Now()
  7914  
  7915  	resultVar0, resultVar1 := s.UserAccessTokenStore.GetAll(offset, limit)
  7916  
  7917  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7918  	if s.Root.Metrics != nil {
  7919  		success := "false"
  7920  		if resultVar1 == nil {
  7921  			success = "true"
  7922  		}
  7923  		s.Root.Metrics.ObserveStoreMethodDuration("UserAccessTokenStore.GetAll", success, elapsed)
  7924  	}
  7925  	return resultVar0, resultVar1
  7926  }
  7927  
  7928  func (s *TimerLayerUserAccessTokenStore) GetByToken(tokenString string) (*model.UserAccessToken, error) {
  7929  	start := timemodule.Now()
  7930  
  7931  	resultVar0, resultVar1 := s.UserAccessTokenStore.GetByToken(tokenString)
  7932  
  7933  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7934  	if s.Root.Metrics != nil {
  7935  		success := "false"
  7936  		if resultVar1 == nil {
  7937  			success = "true"
  7938  		}
  7939  		s.Root.Metrics.ObserveStoreMethodDuration("UserAccessTokenStore.GetByToken", success, elapsed)
  7940  	}
  7941  	return resultVar0, resultVar1
  7942  }
  7943  
  7944  func (s *TimerLayerUserAccessTokenStore) GetByUser(userId string, page int, perPage int) ([]*model.UserAccessToken, error) {
  7945  	start := timemodule.Now()
  7946  
  7947  	resultVar0, resultVar1 := s.UserAccessTokenStore.GetByUser(userId, page, perPage)
  7948  
  7949  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7950  	if s.Root.Metrics != nil {
  7951  		success := "false"
  7952  		if resultVar1 == nil {
  7953  			success = "true"
  7954  		}
  7955  		s.Root.Metrics.ObserveStoreMethodDuration("UserAccessTokenStore.GetByUser", success, elapsed)
  7956  	}
  7957  	return resultVar0, resultVar1
  7958  }
  7959  
  7960  func (s *TimerLayerUserAccessTokenStore) Save(token *model.UserAccessToken) (*model.UserAccessToken, error) {
  7961  	start := timemodule.Now()
  7962  
  7963  	resultVar0, resultVar1 := s.UserAccessTokenStore.Save(token)
  7964  
  7965  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7966  	if s.Root.Metrics != nil {
  7967  		success := "false"
  7968  		if resultVar1 == nil {
  7969  			success = "true"
  7970  		}
  7971  		s.Root.Metrics.ObserveStoreMethodDuration("UserAccessTokenStore.Save", success, elapsed)
  7972  	}
  7973  	return resultVar0, resultVar1
  7974  }
  7975  
  7976  func (s *TimerLayerUserAccessTokenStore) Search(term string) ([]*model.UserAccessToken, error) {
  7977  	start := timemodule.Now()
  7978  
  7979  	resultVar0, resultVar1 := s.UserAccessTokenStore.Search(term)
  7980  
  7981  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7982  	if s.Root.Metrics != nil {
  7983  		success := "false"
  7984  		if resultVar1 == nil {
  7985  			success = "true"
  7986  		}
  7987  		s.Root.Metrics.ObserveStoreMethodDuration("UserAccessTokenStore.Search", success, elapsed)
  7988  	}
  7989  	return resultVar0, resultVar1
  7990  }
  7991  
  7992  func (s *TimerLayerUserAccessTokenStore) UpdateTokenDisable(tokenId string) error {
  7993  	start := timemodule.Now()
  7994  
  7995  	resultVar0 := s.UserAccessTokenStore.UpdateTokenDisable(tokenId)
  7996  
  7997  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  7998  	if s.Root.Metrics != nil {
  7999  		success := "false"
  8000  		if resultVar0 == nil {
  8001  			success = "true"
  8002  		}
  8003  		s.Root.Metrics.ObserveStoreMethodDuration("UserAccessTokenStore.UpdateTokenDisable", success, elapsed)
  8004  	}
  8005  	return resultVar0
  8006  }
  8007  
  8008  func (s *TimerLayerUserAccessTokenStore) UpdateTokenEnable(tokenId string) error {
  8009  	start := timemodule.Now()
  8010  
  8011  	resultVar0 := s.UserAccessTokenStore.UpdateTokenEnable(tokenId)
  8012  
  8013  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8014  	if s.Root.Metrics != nil {
  8015  		success := "false"
  8016  		if resultVar0 == nil {
  8017  			success = "true"
  8018  		}
  8019  		s.Root.Metrics.ObserveStoreMethodDuration("UserAccessTokenStore.UpdateTokenEnable", success, elapsed)
  8020  	}
  8021  	return resultVar0
  8022  }
  8023  
  8024  func (s *TimerLayerUserTermsOfServiceStore) Delete(userId string, termsOfServiceId string) error {
  8025  	start := timemodule.Now()
  8026  
  8027  	resultVar0 := s.UserTermsOfServiceStore.Delete(userId, termsOfServiceId)
  8028  
  8029  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8030  	if s.Root.Metrics != nil {
  8031  		success := "false"
  8032  		if resultVar0 == nil {
  8033  			success = "true"
  8034  		}
  8035  		s.Root.Metrics.ObserveStoreMethodDuration("UserTermsOfServiceStore.Delete", success, elapsed)
  8036  	}
  8037  	return resultVar0
  8038  }
  8039  
  8040  func (s *TimerLayerUserTermsOfServiceStore) GetByUser(userId string) (*model.UserTermsOfService, error) {
  8041  	start := timemodule.Now()
  8042  
  8043  	resultVar0, resultVar1 := s.UserTermsOfServiceStore.GetByUser(userId)
  8044  
  8045  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8046  	if s.Root.Metrics != nil {
  8047  		success := "false"
  8048  		if resultVar1 == nil {
  8049  			success = "true"
  8050  		}
  8051  		s.Root.Metrics.ObserveStoreMethodDuration("UserTermsOfServiceStore.GetByUser", success, elapsed)
  8052  	}
  8053  	return resultVar0, resultVar1
  8054  }
  8055  
  8056  func (s *TimerLayerUserTermsOfServiceStore) Save(userTermsOfService *model.UserTermsOfService) (*model.UserTermsOfService, error) {
  8057  	start := timemodule.Now()
  8058  
  8059  	resultVar0, resultVar1 := s.UserTermsOfServiceStore.Save(userTermsOfService)
  8060  
  8061  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8062  	if s.Root.Metrics != nil {
  8063  		success := "false"
  8064  		if resultVar1 == nil {
  8065  			success = "true"
  8066  		}
  8067  		s.Root.Metrics.ObserveStoreMethodDuration("UserTermsOfServiceStore.Save", success, elapsed)
  8068  	}
  8069  	return resultVar0, resultVar1
  8070  }
  8071  
  8072  func (s *TimerLayerWebhookStore) AnalyticsIncomingCount(teamId string) (int64, error) {
  8073  	start := timemodule.Now()
  8074  
  8075  	resultVar0, resultVar1 := s.WebhookStore.AnalyticsIncomingCount(teamId)
  8076  
  8077  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8078  	if s.Root.Metrics != nil {
  8079  		success := "false"
  8080  		if resultVar1 == nil {
  8081  			success = "true"
  8082  		}
  8083  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.AnalyticsIncomingCount", success, elapsed)
  8084  	}
  8085  	return resultVar0, resultVar1
  8086  }
  8087  
  8088  func (s *TimerLayerWebhookStore) AnalyticsOutgoingCount(teamId string) (int64, error) {
  8089  	start := timemodule.Now()
  8090  
  8091  	resultVar0, resultVar1 := s.WebhookStore.AnalyticsOutgoingCount(teamId)
  8092  
  8093  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8094  	if s.Root.Metrics != nil {
  8095  		success := "false"
  8096  		if resultVar1 == nil {
  8097  			success = "true"
  8098  		}
  8099  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.AnalyticsOutgoingCount", success, elapsed)
  8100  	}
  8101  	return resultVar0, resultVar1
  8102  }
  8103  
  8104  func (s *TimerLayerWebhookStore) ClearCaches() {
  8105  	start := timemodule.Now()
  8106  
  8107  	s.WebhookStore.ClearCaches()
  8108  
  8109  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8110  	if s.Root.Metrics != nil {
  8111  		success := "false"
  8112  		if true {
  8113  			success = "true"
  8114  		}
  8115  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.ClearCaches", success, elapsed)
  8116  	}
  8117  }
  8118  
  8119  func (s *TimerLayerWebhookStore) DeleteIncoming(webhookId string, time int64) error {
  8120  	start := timemodule.Now()
  8121  
  8122  	resultVar0 := s.WebhookStore.DeleteIncoming(webhookId, time)
  8123  
  8124  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8125  	if s.Root.Metrics != nil {
  8126  		success := "false"
  8127  		if resultVar0 == nil {
  8128  			success = "true"
  8129  		}
  8130  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.DeleteIncoming", success, elapsed)
  8131  	}
  8132  	return resultVar0
  8133  }
  8134  
  8135  func (s *TimerLayerWebhookStore) DeleteOutgoing(webhookId string, time int64) error {
  8136  	start := timemodule.Now()
  8137  
  8138  	resultVar0 := s.WebhookStore.DeleteOutgoing(webhookId, time)
  8139  
  8140  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8141  	if s.Root.Metrics != nil {
  8142  		success := "false"
  8143  		if resultVar0 == nil {
  8144  			success = "true"
  8145  		}
  8146  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.DeleteOutgoing", success, elapsed)
  8147  	}
  8148  	return resultVar0
  8149  }
  8150  
  8151  func (s *TimerLayerWebhookStore) GetIncoming(id string, allowFromCache bool) (*model.IncomingWebhook, error) {
  8152  	start := timemodule.Now()
  8153  
  8154  	resultVar0, resultVar1 := s.WebhookStore.GetIncoming(id, allowFromCache)
  8155  
  8156  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8157  	if s.Root.Metrics != nil {
  8158  		success := "false"
  8159  		if resultVar1 == nil {
  8160  			success = "true"
  8161  		}
  8162  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetIncoming", success, elapsed)
  8163  	}
  8164  	return resultVar0, resultVar1
  8165  }
  8166  
  8167  func (s *TimerLayerWebhookStore) GetIncomingByChannel(channelId string) ([]*model.IncomingWebhook, error) {
  8168  	start := timemodule.Now()
  8169  
  8170  	resultVar0, resultVar1 := s.WebhookStore.GetIncomingByChannel(channelId)
  8171  
  8172  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8173  	if s.Root.Metrics != nil {
  8174  		success := "false"
  8175  		if resultVar1 == nil {
  8176  			success = "true"
  8177  		}
  8178  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetIncomingByChannel", success, elapsed)
  8179  	}
  8180  	return resultVar0, resultVar1
  8181  }
  8182  
  8183  func (s *TimerLayerWebhookStore) GetIncomingByTeam(teamId string, offset int, limit int) ([]*model.IncomingWebhook, error) {
  8184  	start := timemodule.Now()
  8185  
  8186  	resultVar0, resultVar1 := s.WebhookStore.GetIncomingByTeam(teamId, offset, limit)
  8187  
  8188  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8189  	if s.Root.Metrics != nil {
  8190  		success := "false"
  8191  		if resultVar1 == nil {
  8192  			success = "true"
  8193  		}
  8194  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetIncomingByTeam", success, elapsed)
  8195  	}
  8196  	return resultVar0, resultVar1
  8197  }
  8198  
  8199  func (s *TimerLayerWebhookStore) GetIncomingByTeamByUser(teamId string, userId string, offset int, limit int) ([]*model.IncomingWebhook, error) {
  8200  	start := timemodule.Now()
  8201  
  8202  	resultVar0, resultVar1 := s.WebhookStore.GetIncomingByTeamByUser(teamId, userId, offset, limit)
  8203  
  8204  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8205  	if s.Root.Metrics != nil {
  8206  		success := "false"
  8207  		if resultVar1 == nil {
  8208  			success = "true"
  8209  		}
  8210  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetIncomingByTeamByUser", success, elapsed)
  8211  	}
  8212  	return resultVar0, resultVar1
  8213  }
  8214  
  8215  func (s *TimerLayerWebhookStore) GetIncomingList(offset int, limit int) ([]*model.IncomingWebhook, error) {
  8216  	start := timemodule.Now()
  8217  
  8218  	resultVar0, resultVar1 := s.WebhookStore.GetIncomingList(offset, limit)
  8219  
  8220  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8221  	if s.Root.Metrics != nil {
  8222  		success := "false"
  8223  		if resultVar1 == nil {
  8224  			success = "true"
  8225  		}
  8226  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetIncomingList", success, elapsed)
  8227  	}
  8228  	return resultVar0, resultVar1
  8229  }
  8230  
  8231  func (s *TimerLayerWebhookStore) GetIncomingListByUser(userId string, offset int, limit int) ([]*model.IncomingWebhook, error) {
  8232  	start := timemodule.Now()
  8233  
  8234  	resultVar0, resultVar1 := s.WebhookStore.GetIncomingListByUser(userId, offset, limit)
  8235  
  8236  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8237  	if s.Root.Metrics != nil {
  8238  		success := "false"
  8239  		if resultVar1 == nil {
  8240  			success = "true"
  8241  		}
  8242  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetIncomingListByUser", success, elapsed)
  8243  	}
  8244  	return resultVar0, resultVar1
  8245  }
  8246  
  8247  func (s *TimerLayerWebhookStore) GetOutgoing(id string) (*model.OutgoingWebhook, error) {
  8248  	start := timemodule.Now()
  8249  
  8250  	resultVar0, resultVar1 := s.WebhookStore.GetOutgoing(id)
  8251  
  8252  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8253  	if s.Root.Metrics != nil {
  8254  		success := "false"
  8255  		if resultVar1 == nil {
  8256  			success = "true"
  8257  		}
  8258  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetOutgoing", success, elapsed)
  8259  	}
  8260  	return resultVar0, resultVar1
  8261  }
  8262  
  8263  func (s *TimerLayerWebhookStore) GetOutgoingByChannel(channelId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
  8264  	start := timemodule.Now()
  8265  
  8266  	resultVar0, resultVar1 := s.WebhookStore.GetOutgoingByChannel(channelId, offset, limit)
  8267  
  8268  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8269  	if s.Root.Metrics != nil {
  8270  		success := "false"
  8271  		if resultVar1 == nil {
  8272  			success = "true"
  8273  		}
  8274  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetOutgoingByChannel", success, elapsed)
  8275  	}
  8276  	return resultVar0, resultVar1
  8277  }
  8278  
  8279  func (s *TimerLayerWebhookStore) GetOutgoingByChannelByUser(channelId string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
  8280  	start := timemodule.Now()
  8281  
  8282  	resultVar0, resultVar1 := s.WebhookStore.GetOutgoingByChannelByUser(channelId, userId, offset, limit)
  8283  
  8284  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8285  	if s.Root.Metrics != nil {
  8286  		success := "false"
  8287  		if resultVar1 == nil {
  8288  			success = "true"
  8289  		}
  8290  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetOutgoingByChannelByUser", success, elapsed)
  8291  	}
  8292  	return resultVar0, resultVar1
  8293  }
  8294  
  8295  func (s *TimerLayerWebhookStore) GetOutgoingByTeam(teamId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
  8296  	start := timemodule.Now()
  8297  
  8298  	resultVar0, resultVar1 := s.WebhookStore.GetOutgoingByTeam(teamId, offset, limit)
  8299  
  8300  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8301  	if s.Root.Metrics != nil {
  8302  		success := "false"
  8303  		if resultVar1 == nil {
  8304  			success = "true"
  8305  		}
  8306  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetOutgoingByTeam", success, elapsed)
  8307  	}
  8308  	return resultVar0, resultVar1
  8309  }
  8310  
  8311  func (s *TimerLayerWebhookStore) GetOutgoingByTeamByUser(teamId string, userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
  8312  	start := timemodule.Now()
  8313  
  8314  	resultVar0, resultVar1 := s.WebhookStore.GetOutgoingByTeamByUser(teamId, userId, offset, limit)
  8315  
  8316  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8317  	if s.Root.Metrics != nil {
  8318  		success := "false"
  8319  		if resultVar1 == nil {
  8320  			success = "true"
  8321  		}
  8322  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetOutgoingByTeamByUser", success, elapsed)
  8323  	}
  8324  	return resultVar0, resultVar1
  8325  }
  8326  
  8327  func (s *TimerLayerWebhookStore) GetOutgoingList(offset int, limit int) ([]*model.OutgoingWebhook, error) {
  8328  	start := timemodule.Now()
  8329  
  8330  	resultVar0, resultVar1 := s.WebhookStore.GetOutgoingList(offset, limit)
  8331  
  8332  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8333  	if s.Root.Metrics != nil {
  8334  		success := "false"
  8335  		if resultVar1 == nil {
  8336  			success = "true"
  8337  		}
  8338  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetOutgoingList", success, elapsed)
  8339  	}
  8340  	return resultVar0, resultVar1
  8341  }
  8342  
  8343  func (s *TimerLayerWebhookStore) GetOutgoingListByUser(userId string, offset int, limit int) ([]*model.OutgoingWebhook, error) {
  8344  	start := timemodule.Now()
  8345  
  8346  	resultVar0, resultVar1 := s.WebhookStore.GetOutgoingListByUser(userId, offset, limit)
  8347  
  8348  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8349  	if s.Root.Metrics != nil {
  8350  		success := "false"
  8351  		if resultVar1 == nil {
  8352  			success = "true"
  8353  		}
  8354  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.GetOutgoingListByUser", success, elapsed)
  8355  	}
  8356  	return resultVar0, resultVar1
  8357  }
  8358  
  8359  func (s *TimerLayerWebhookStore) InvalidateWebhookCache(webhook string) {
  8360  	start := timemodule.Now()
  8361  
  8362  	s.WebhookStore.InvalidateWebhookCache(webhook)
  8363  
  8364  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8365  	if s.Root.Metrics != nil {
  8366  		success := "false"
  8367  		if true {
  8368  			success = "true"
  8369  		}
  8370  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.InvalidateWebhookCache", success, elapsed)
  8371  	}
  8372  }
  8373  
  8374  func (s *TimerLayerWebhookStore) PermanentDeleteIncomingByChannel(channelId string) error {
  8375  	start := timemodule.Now()
  8376  
  8377  	resultVar0 := s.WebhookStore.PermanentDeleteIncomingByChannel(channelId)
  8378  
  8379  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8380  	if s.Root.Metrics != nil {
  8381  		success := "false"
  8382  		if resultVar0 == nil {
  8383  			success = "true"
  8384  		}
  8385  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.PermanentDeleteIncomingByChannel", success, elapsed)
  8386  	}
  8387  	return resultVar0
  8388  }
  8389  
  8390  func (s *TimerLayerWebhookStore) PermanentDeleteIncomingByUser(userId string) error {
  8391  	start := timemodule.Now()
  8392  
  8393  	resultVar0 := s.WebhookStore.PermanentDeleteIncomingByUser(userId)
  8394  
  8395  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8396  	if s.Root.Metrics != nil {
  8397  		success := "false"
  8398  		if resultVar0 == nil {
  8399  			success = "true"
  8400  		}
  8401  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.PermanentDeleteIncomingByUser", success, elapsed)
  8402  	}
  8403  	return resultVar0
  8404  }
  8405  
  8406  func (s *TimerLayerWebhookStore) PermanentDeleteOutgoingByChannel(channelId string) error {
  8407  	start := timemodule.Now()
  8408  
  8409  	resultVar0 := s.WebhookStore.PermanentDeleteOutgoingByChannel(channelId)
  8410  
  8411  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8412  	if s.Root.Metrics != nil {
  8413  		success := "false"
  8414  		if resultVar0 == nil {
  8415  			success = "true"
  8416  		}
  8417  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.PermanentDeleteOutgoingByChannel", success, elapsed)
  8418  	}
  8419  	return resultVar0
  8420  }
  8421  
  8422  func (s *TimerLayerWebhookStore) PermanentDeleteOutgoingByUser(userId string) error {
  8423  	start := timemodule.Now()
  8424  
  8425  	resultVar0 := s.WebhookStore.PermanentDeleteOutgoingByUser(userId)
  8426  
  8427  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8428  	if s.Root.Metrics != nil {
  8429  		success := "false"
  8430  		if resultVar0 == nil {
  8431  			success = "true"
  8432  		}
  8433  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.PermanentDeleteOutgoingByUser", success, elapsed)
  8434  	}
  8435  	return resultVar0
  8436  }
  8437  
  8438  func (s *TimerLayerWebhookStore) SaveIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error) {
  8439  	start := timemodule.Now()
  8440  
  8441  	resultVar0, resultVar1 := s.WebhookStore.SaveIncoming(webhook)
  8442  
  8443  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8444  	if s.Root.Metrics != nil {
  8445  		success := "false"
  8446  		if resultVar1 == nil {
  8447  			success = "true"
  8448  		}
  8449  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.SaveIncoming", success, elapsed)
  8450  	}
  8451  	return resultVar0, resultVar1
  8452  }
  8453  
  8454  func (s *TimerLayerWebhookStore) SaveOutgoing(webhook *model.OutgoingWebhook) (*model.OutgoingWebhook, error) {
  8455  	start := timemodule.Now()
  8456  
  8457  	resultVar0, resultVar1 := s.WebhookStore.SaveOutgoing(webhook)
  8458  
  8459  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8460  	if s.Root.Metrics != nil {
  8461  		success := "false"
  8462  		if resultVar1 == nil {
  8463  			success = "true"
  8464  		}
  8465  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.SaveOutgoing", success, elapsed)
  8466  	}
  8467  	return resultVar0, resultVar1
  8468  }
  8469  
  8470  func (s *TimerLayerWebhookStore) UpdateIncoming(webhook *model.IncomingWebhook) (*model.IncomingWebhook, error) {
  8471  	start := timemodule.Now()
  8472  
  8473  	resultVar0, resultVar1 := s.WebhookStore.UpdateIncoming(webhook)
  8474  
  8475  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8476  	if s.Root.Metrics != nil {
  8477  		success := "false"
  8478  		if resultVar1 == nil {
  8479  			success = "true"
  8480  		}
  8481  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.UpdateIncoming", success, elapsed)
  8482  	}
  8483  	return resultVar0, resultVar1
  8484  }
  8485  
  8486  func (s *TimerLayerWebhookStore) UpdateOutgoing(hook *model.OutgoingWebhook) (*model.OutgoingWebhook, error) {
  8487  	start := timemodule.Now()
  8488  
  8489  	resultVar0, resultVar1 := s.WebhookStore.UpdateOutgoing(hook)
  8490  
  8491  	elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
  8492  	if s.Root.Metrics != nil {
  8493  		success := "false"
  8494  		if resultVar1 == nil {
  8495  			success = "true"
  8496  		}
  8497  		s.Root.Metrics.ObserveStoreMethodDuration("WebhookStore.UpdateOutgoing", success, elapsed)
  8498  	}
  8499  	return resultVar0, resultVar1
  8500  }
  8501  
  8502  func (s *TimerLayer) Close() {
  8503  	s.Store.Close()
  8504  }
  8505  
  8506  func (s *TimerLayer) DropAllTables() {
  8507  	s.Store.DropAllTables()
  8508  }
  8509  
  8510  func (s *TimerLayer) GetCurrentSchemaVersion() string {
  8511  	return s.Store.GetCurrentSchemaVersion()
  8512  }
  8513  
  8514  func (s *TimerLayer) LockToMaster() {
  8515  	s.Store.LockToMaster()
  8516  }
  8517  
  8518  func (s *TimerLayer) MarkSystemRanUnitTests() {
  8519  	s.Store.MarkSystemRanUnitTests()
  8520  }
  8521  
  8522  func (s *TimerLayer) SetContext(context context.Context) {
  8523  	s.Store.SetContext(context)
  8524  }
  8525  
  8526  func (s *TimerLayer) TotalMasterDbConnections() int {
  8527  	return s.Store.TotalMasterDbConnections()
  8528  }
  8529  
  8530  func (s *TimerLayer) TotalReadDbConnections() int {
  8531  	return s.Store.TotalReadDbConnections()
  8532  }
  8533  
  8534  func (s *TimerLayer) TotalSearchDbConnections() int {
  8535  	return s.Store.TotalSearchDbConnections()
  8536  }
  8537  
  8538  func (s *TimerLayer) UnlockFromMaster() {
  8539  	s.Store.UnlockFromMaster()
  8540  }
  8541  
  8542  func New(childStore store.Store, metrics einterfaces.MetricsInterface) *TimerLayer {
  8543  	newStore := TimerLayer{
  8544  		Store:   childStore,
  8545  		Metrics: metrics,
  8546  	}
  8547  
  8548  	newStore.AuditStore = &TimerLayerAuditStore{AuditStore: childStore.Audit(), Root: &newStore}
  8549  	newStore.BotStore = &TimerLayerBotStore{BotStore: childStore.Bot(), Root: &newStore}
  8550  	newStore.ChannelStore = &TimerLayerChannelStore{ChannelStore: childStore.Channel(), Root: &newStore}
  8551  	newStore.ChannelMemberHistoryStore = &TimerLayerChannelMemberHistoryStore{ChannelMemberHistoryStore: childStore.ChannelMemberHistory(), Root: &newStore}
  8552  	newStore.ClusterDiscoveryStore = &TimerLayerClusterDiscoveryStore{ClusterDiscoveryStore: childStore.ClusterDiscovery(), Root: &newStore}
  8553  	newStore.CommandStore = &TimerLayerCommandStore{CommandStore: childStore.Command(), Root: &newStore}
  8554  	newStore.CommandWebhookStore = &TimerLayerCommandWebhookStore{CommandWebhookStore: childStore.CommandWebhook(), Root: &newStore}
  8555  	newStore.ComplianceStore = &TimerLayerComplianceStore{ComplianceStore: childStore.Compliance(), Root: &newStore}
  8556  	newStore.EmojiStore = &TimerLayerEmojiStore{EmojiStore: childStore.Emoji(), Root: &newStore}
  8557  	newStore.FileInfoStore = &TimerLayerFileInfoStore{FileInfoStore: childStore.FileInfo(), Root: &newStore}
  8558  	newStore.GroupStore = &TimerLayerGroupStore{GroupStore: childStore.Group(), Root: &newStore}
  8559  	newStore.JobStore = &TimerLayerJobStore{JobStore: childStore.Job(), Root: &newStore}
  8560  	newStore.LicenseStore = &TimerLayerLicenseStore{LicenseStore: childStore.License(), Root: &newStore}
  8561  	newStore.LinkMetadataStore = &TimerLayerLinkMetadataStore{LinkMetadataStore: childStore.LinkMetadata(), Root: &newStore}
  8562  	newStore.OAuthStore = &TimerLayerOAuthStore{OAuthStore: childStore.OAuth(), Root: &newStore}
  8563  	newStore.PluginStore = &TimerLayerPluginStore{PluginStore: childStore.Plugin(), Root: &newStore}
  8564  	newStore.PostStore = &TimerLayerPostStore{PostStore: childStore.Post(), Root: &newStore}
  8565  	newStore.PreferenceStore = &TimerLayerPreferenceStore{PreferenceStore: childStore.Preference(), Root: &newStore}
  8566  	newStore.ReactionStore = &TimerLayerReactionStore{ReactionStore: childStore.Reaction(), Root: &newStore}
  8567  	newStore.RoleStore = &TimerLayerRoleStore{RoleStore: childStore.Role(), Root: &newStore}
  8568  	newStore.SchemeStore = &TimerLayerSchemeStore{SchemeStore: childStore.Scheme(), Root: &newStore}
  8569  	newStore.SessionStore = &TimerLayerSessionStore{SessionStore: childStore.Session(), Root: &newStore}
  8570  	newStore.StatusStore = &TimerLayerStatusStore{StatusStore: childStore.Status(), Root: &newStore}
  8571  	newStore.SystemStore = &TimerLayerSystemStore{SystemStore: childStore.System(), Root: &newStore}
  8572  	newStore.TeamStore = &TimerLayerTeamStore{TeamStore: childStore.Team(), Root: &newStore}
  8573  	newStore.TermsOfServiceStore = &TimerLayerTermsOfServiceStore{TermsOfServiceStore: childStore.TermsOfService(), Root: &newStore}
  8574  	newStore.TokenStore = &TimerLayerTokenStore{TokenStore: childStore.Token(), Root: &newStore}
  8575  	newStore.UserStore = &TimerLayerUserStore{UserStore: childStore.User(), Root: &newStore}
  8576  	newStore.UserAccessTokenStore = &TimerLayerUserAccessTokenStore{UserAccessTokenStore: childStore.UserAccessToken(), Root: &newStore}
  8577  	newStore.UserTermsOfServiceStore = &TimerLayerUserTermsOfServiceStore{UserTermsOfServiceStore: childStore.UserTermsOfService(), Root: &newStore}
  8578  	newStore.WebhookStore = &TimerLayerWebhookStore{WebhookStore: childStore.Webhook(), Root: &newStore}
  8579  	return &newStore
  8580  }