containerd/supervisor/metrics.go
Michael Crosby 7d4f74474e Add more metrics collection
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-18 16:54:02 -08:00

27 lines
888 B
Go

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()
)
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,
}
}