diff --git a/container.go b/container.go index 16e4124..57b37e9 100644 --- a/container.go +++ b/container.go @@ -67,6 +67,7 @@ func (c *Container) Read(stream chan metrics.Metrics) { c.Widgets.SetMetrics(metrics) } log.Infof("reader stopped for container: %s", c.Id) + c.Metrics = metrics.NewMetrics() c.Widgets.Reset() }() log.Infof("reader started for container: %s", c.Id) diff --git a/mocksource.go b/mocksource.go index 0b33ab9..6b4e28e 100644 --- a/mocksource.go +++ b/mocksource.go @@ -28,7 +28,7 @@ func (cs *MockContainerSource) Init() { rand.Seed(int64(time.Now().Nanosecond())) for i := 0; i < total; i++ { - time.Sleep(2 * time.Second) + time.Sleep(1 * time.Second) collector := metrics.NewMock() c := NewContainer(makeID(), collector) c.SetName(makeName())