Ejemplo n.º 1
0
        private static void DoTenUrlsInSequence()
        {
            Console.WriteLine("Do 10 urls in sequence");
            var        sw   = Stopwatch.StartNew();
            ISpeedTest test = new SpeedTest();

            foreach (var url in TestUrls)
            {
                var result = test.GetSpeed(url);
                Console.WriteLine("r:{0}, s:{1}, b:{2}, u:{3}",
                                  result.ResponseTimeMs, result.ReadStreamTimeMs, result.ResponseLength, result.Url);
            }
            sw.Stop();
            Console.WriteLine("Total elapsed time: {0}", sw.ElapsedMilliseconds);
            Console.WriteLine(string.Empty);
        }
Ejemplo n.º 2
0
 private static void DoWarmUp()
 {
     var        testUrl = @"http://www.tsjensen.com/blog/post/2013/04/22/Distributed-Parallel-Processing-in-Simple-NET-Console-Application.aspx";
     ISpeedTest test    = new SpeedTest();
     var        result  = test.GetSpeed(testUrl);
 }