From e81513349fead9755f825d82d231fa65c9af2029 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 5 Nov 2015 17:03:37 -0800 Subject: [PATCH] Use gague for go routines --- containerd/daemon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containerd/daemon.go b/containerd/daemon.go index e457bd0..a3d83d5 100644 --- a/containerd/daemon.go +++ b/containerd/daemon.go @@ -34,11 +34,11 @@ var DaemonCommand = cli.Command{ Action: func(context *cli.Context) { if context.GlobalBool("debug") { l := log.New(os.Stdout, "[containerd] ", log.LstdFlags) - goRoutineCounter := metrics.NewMeter() + goRoutineCounter := metrics.NewGauge() metrics.DefaultRegistry.Register("goroutines", goRoutineCounter) go func() { for range time.Tick(30 * time.Second) { - goRoutineCounter.Mark(int64(runtime.NumGoroutine())) + goRoutineCounter.Update(int64(runtime.NumGoroutine())) } }() go metrics.Log(metrics.DefaultRegistry, 60*time.Second, l)