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
Этот коммит содержится в:
Corey Hulen
2016-11-22 11:05:54 -08:00
коммит произвёл Harrison Healey
родитель e033dcce8e
Коммит 7961599b2e
389 изменённых файлов: 76289 добавлений и 1023 удалений

32
einterfaces/metrics.go Обычный файл
Просмотреть файл

@@ -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
}