コード例 #1
0
        public static void AMetricCanBeSentWithoutAnExceptionBeingThrown()
        {
            // Arrange
            var endPointSource = EndpointLookups.EndpointParser.MakeEndPointSource("127.0.0.1", 8125, null);
            var target         = new UdpTransport(endPointSource);

            // Act and Assert
            target.Send("mycustommetric");
        }
コード例 #2
0
        public static void MultipleMetricsCanBeSentWithoutAnExceptionBeingThrownParallel()
        {
            // Arrange
            var endPointSource = EndpointLookups.EndpointParser.MakeEndPointSource("127.0.0.1", 8125, null);

            var target = new UdpTransport(endPointSource);

            Parallel.For(0, 10_000, (_) =>
            {
                target.Send("mycustommetric");
            });
        }
コード例 #3
0
        public static void MultipleMetricsCanBeSentWithoutAnExceptionBeingThrownSerial()
        {
            // Arrange
            var endPointSource = EndpointLookups.EndpointParser.MakeEndPointSource("127.0.0.1", 8125, null);

            var target = new UdpTransport(endPointSource);

            for (int i = 0; i < 10_000; i++)
            {
                // Act and Assert
                target.Send("mycustommetric");
            }
        }