"doppler/sinks" "doppler/sinks/dump" "doppler/sinks/syslog" "doppler/sinks/websocket" "doppler/sinkserver/metrics" "github.com/cloudfoundry/sonde-go/events" "github.com/gogo/protobuf/proto" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("SinkManagerMetrics", func() { var sinkManagerMetrics *metrics.SinkManagerMetrics var sink sinks.Sink var dropUpdateChan chan int64 BeforeEach(func() { fakeEventEmitter.Reset() dropUpdateChan = make(chan int64) sinkManagerMetrics = metrics.NewSinkManagerMetrics(dropUpdateChan) }) It("emits metrics for dump sinks", func() { Expect(fakeEventEmitter.GetMessages()).To(BeEmpty()) sink = &dump.DumpSink{} sinkManagerMetrics.Inc(sink)
"doppler/sinks/containermetric" "doppler/sinks/dump" "doppler/sinks/syslog" "doppler/sinks/websocket" "doppler/sinkserver/metrics" "github.com/cloudfoundry/sonde-go/events" "github.com/gogo/protobuf/proto" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("SinkManagerMetrics", func() { var sinkManagerMetrics *metrics.SinkManagerMetrics var sink sinks.Sink BeforeEach(func() { fakeEventEmitter.Reset() sinkManagerMetrics = metrics.NewSinkManagerMetrics() }) It("emits metrics for dump sinks", func() { Expect(fakeEventEmitter.GetMessages()).To(BeEmpty()) sink = &dump.DumpSink{} sinkManagerMetrics.Inc(sink) Expect(fakeEventEmitter.GetMessages()[0].Event.(*events.ValueMetric)).To(Equal(&events.ValueMetric{ Name: proto.String("messageRouter.numberOfDumpSinks"),