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); }
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()); }
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()); }