Exemple #1
0
        static async Task Main(string[] args)
        {
            var pagespeedTest = new PageSpeedTest();
            await pagespeedTest.RunPerformanceTestAsync();

            OutputResult(pagespeedTest);
        }
Exemple #2
0
        static void OutputResult(PageSpeedTest pagespeedTest)
        {
            Console.WriteLine($"Time elapsed: {pagespeedTest.TimeTakenInMsec} msec");
            Console.WriteLine($"Total number of test: {pagespeedTest.TotalTest}");

            var defaultColor = Console.ForegroundColor;

            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine($"Pass: {pagespeedTest.TestPass}");
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine($"Fail: {pagespeedTest.TestFail}");
            Console.ForegroundColor = defaultColor;
        }