mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* WIP * WIP * Adding metrics collection * updating vendor packages * Adding metrics to config * Adding admin console page for perf monitoring * Updating glide * switching to tylerb/graceful
33 lines
686 B
Go
33 lines
686 B
Go
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
package einterfaces
|
|
|
|
type MetricsInterface interface {
|
|
StartServer()
|
|
StopServer()
|
|
|
|
IncrementPostCreate()
|
|
IncrementPostSentEmail()
|
|
IncrementPostSentPush()
|
|
IncrementPostBroadcast()
|
|
IncrementPostFileAttachment(count int)
|
|
|
|
IncrementHttpRequest()
|
|
IncrementHttpError()
|
|
ObserveHttpRequestDuration(elapsed float64)
|
|
|
|
IncrementLogin()
|
|
IncrementLoginFail()
|
|
}
|
|
|
|
var theMetricsInterface MetricsInterface
|
|
|
|
func RegisterMetricsInterface(newInterface MetricsInterface) {
|
|
theMetricsInterface = newInterface
|
|
}
|
|
|
|
func GetMetricsInterface() MetricsInterface {
|
|
return theMetricsInterface
|
|
}
|