2015-12-19 00:54:02 +00:00
|
|
|
package supervisor
|
|
|
|
|
|
|
|
import "github.com/rcrowley/go-metrics"
|
|
|
|
|
|
|
|
var (
|
|
|
|
ContainerCreateTimer = metrics.NewTimer()
|
|
|
|
ContainerDeleteTimer = metrics.NewTimer()
|
|
|
|
ContainerStartTimer = metrics.NewTimer()
|
|
|
|
ContainersCounter = metrics.NewCounter()
|
|
|
|
EventSubscriberCounter = metrics.NewCounter()
|
|
|
|
EventsCounter = metrics.NewCounter()
|
|
|
|
ExecProcessTimer = metrics.NewTimer()
|
|
|
|
ExitProcessTimer = metrics.NewTimer()
|
2016-02-01 19:02:41 +00:00
|
|
|
EpollFdCounter = metrics.NewCounter()
|
2015-12-19 00:54:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func Metrics() map[string]interface{} {
|
|
|
|
return map[string]interface{}{
|
|
|
|
"container-create-time": ContainerCreateTimer,
|
|
|
|
"container-delete-time": ContainerDeleteTimer,
|
|
|
|
"container-start-time": ContainerStartTimer,
|
|
|
|
"containers": ContainersCounter,
|
|
|
|
"event-subscribers": EventSubscriberCounter,
|
|
|
|
"events": EventsCounter,
|
|
|
|
"exec-process-time": ExecProcessTimer,
|
|
|
|
"exit-process-time": ExitProcessTimer,
|
2016-02-01 19:02:41 +00:00
|
|
|
"epoll-fds": EpollFdCounter,
|
2015-12-19 00:54:02 +00:00
|
|
|
}
|
|
|
|
}
|