public void RunUdp() { _udpSender.Increment("hello.u"); _udpSender.Increment(20, "increment.u"); _udpSender.Timing(Timed, "timer.u"); _udpSender.Gauge(354654, "gauge.u"); _udpSender.Gauge(25.1, "free-space.u"); }
public void RunIp() { _ipSender.Increment("hello.i"); _ipSender.Increment(20, "increment.i"); _ipSender.Timing(Timed, "timer.i"); _ipSender.Gauge(354654, "gauge.i"); _ipSender.Gauge(25.1, "free-space.i"); }
public void ItShouldBeAbleToSendMessagesOfArbitraryLength(char ch, int count) { var config = new StatsDConfiguration { Host = "127.0.0.1" }; var fakeTransport = new FakeTransport(); var publisher = new BufferBasedStatsDPublisher(config, fakeTransport); publisher.Increment(new string(ch, count)); fakeTransport.TimesCalled.ShouldBe(1); }
public void Setup() { var config = new StatsDConfiguration { // if you want to verify that stats are received, // you will need the IP of suitable local test stats server Host = "127.0.0.1", Prefix = "testmetric" }; var endpointSource = EndpointParser.MakeEndPointSource( config.Host, config.Port, config.DnsLookupInterval); _transport = new SocketTransport(endpointSource, SocketProtocol.Udp); _adaptedStatsDPublisher = new StatsDPublisher(config); _adaptedStatsDPublisher.Increment("startup.ud"); _udpSender = new BufferBasedStatsDPublisher(config, _transport); _udpSender.Increment("startup.ud"); }
public void SendStatUdp() { _udpSender.Increment("increment.ud"); _udpSender.Timing(Timed, "timer.ud"); }