mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-4357 adding performance monitoring (#4622)
* 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
This commit is contained in:
committed by
Harrison Healey
parent
e033dcce8e
commit
7961599b2e
32
einterfaces/metrics.go
Normal file
32
einterfaces/metrics.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// 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
|
||||
}
|
||||
Reference in New Issue
Block a user