Beispiel #1
0
 public void AsyncResolvePublicIpTest() {
     var n = new FastHttpClient(); //init settings
     Thread.Sleep(3000);
     var sw = new Stopwatch();
     sw.Start();
     Assert.IsNotNull(IpResolver.GetPublic());
     Debug.WriteLine(sw.ElapsedMilliseconds);
 }
Beispiel #2
0
        public void AsyncResolvePublicIpTest()
        {
            var n = new FastHttpClient(); //init settings

            Thread.Sleep(3000);
            var sw = new Stopwatch();

            sw.Start();
            Assert.IsNotNull(IpResolver.GetPublic());
            Debug.WriteLine(sw.ElapsedMilliseconds);
        }
Beispiel #3
0
 public void MultiAsyncResolvePublicIpTest() {
     var l = new List<long>();
     var n = new FastHttpClient(); //init settings
     Thread.Sleep(3000);
     var sw = new Stopwatch();
     for (int i = 0; i < 20; i++) {
         sw.Restart();
         Assert.IsNotNull(IpResolver.GetPublic());
         Debug.WriteLine(sw.ElapsedMilliseconds);
         l.Add(sw.ElapsedMilliseconds);
     }
     Debug.WriteLine("Average: "+l.Average());
 }
Beispiel #4
0
        public void MultiAsyncResolvePublicIpTest()
        {
            var l = new List <long>();
            var n = new FastHttpClient(); //init settings

            Thread.Sleep(3000);
            var sw = new Stopwatch();

            for (int i = 0; i < 20; i++)
            {
                sw.Restart();
                Assert.IsNotNull(IpResolver.GetPublic());
                Debug.WriteLine(sw.ElapsedMilliseconds);
                l.Add(sw.ElapsedMilliseconds);
            }
            Debug.WriteLine("Average: " + l.Average());
        }