Beispiel #1
0
 public PageLoad(string scheme)
 {
     _perfLog = new PerformanceLog("pageloadtestresults");
     _perfLog.InitializeLog("Site,Browser,Result (ms),Iteration,Error");
     _scheme = scheme;
     _watch  = Stopwatch.StartNew();
 }
Beispiel #2
0
        private static void RunPerformance()
        {
            if (performanceTests.Count > 0)
            {
                using (var perfLog = new PerformanceLog("performancetestresults"))
                {
                    perfLog.InitializeLog("Benchmark,Browser,Result,Iteration");

                    Performance performanceTester = new Performance(perfLog);

                    foreach (Browser browser in chosenBrowsers.ChosenBrowsers())
                    {
                        try
                        {
                            using (var driver = LaunchDriver(browser))
                            {
                                InitializeDriver(driver);

                                if (performanceTests.Contains("Octane"))
                                {
                                    performanceTester.Octane(browser, driver, performanceIterations);
                                }
                                if (performanceTests.Contains("SunSpider"))
                                {
                                    performanceTester.SunSpider(browser, driver, performanceIterations);
                                }
                                if (performanceTests.Contains("JetStream"))
                                {
                                    performanceTester.JetStream(browser, driver, performanceIterations);
                                }
                                if (performanceTests.Contains("WebXPRT"))
                                {
                                    performanceTester.WebXPRT(browser, driver, performanceIterations);
                                }
                                if (performanceTests.Contains("OORTOnline"))
                                {
                                    performanceTester.OORTOnline(browser, driver, performanceIterations);
                                }
                            }
                        }
                        catch (Exception e)
                        {
                            Console.WriteLine($"Unexpected exception from running browser: {e}");
                        }
                    }
                }
            }
        }
 public MemoryUsage()
 {
     _perfLog = new PerformanceLog("memoryusagetestresults");
     _perfLog.InitializeLog("Site,StartMemoryAverage,EndMemoryAverage,Delta");
 }