go reporter.Start() }) AfterEach(func() { buffer.Close() }) It("should increment sent counter", func() { reporter.GetSentCounter().IncrementValue() reporter.GetSentCounter().IncrementValue() Eventually(buffer).Should(gbytes.Say("2, 0")) reporter.Stop() }) It("should increment received counter", func() { reporter.GetReceivedCounter().IncrementValue() Eventually(buffer).Should(gbytes.Say("0, 1")) reporter.Stop() }) It("should report metric after reportTime is up", func() { reporter.GetSentCounter().IncrementValue() reporter.GetSentCounter().IncrementValue() reporter.GetReceivedCounter().IncrementValue() Eventually(buffer).Should(gbytes.Say("2, 1")) Eventually(buffer).Should(gbytes.Say("0, 0")) reporter.Stop() }) It("should write averages", func() {