From 912c9baea18c5ff8152a0cabf9f049ff167d48c2 Mon Sep 17 00:00:00 2001 From: "rhelmer%mozilla.com" Date: Fri, 22 Jun 2007 02:13:26 +0000 Subject: [PATCH] - adds ability to set the browser height and width through the config.py file - adds a few prefs to sample.yaml that disallows browser move, resize and the running of java - increase the default page load timeout in the framecycler to 25000 ms - some changes made to the way data is passed between the framecycler and talos, will make it easier to add csv data dumping support b=385404, p=anodelman, r=rhelmer git-svn-id: svn://10.0.0.236/trunk@228567 18797224-902f-48f8-a5cc-f745e15eee43 --- .../talos/base_profile/localstore.rdf | 4 +- mozilla/testing/performance/talos/config.py | 15 ++++--- .../performance/talos/ffprocess_linux.py | 6 ++- .../performance/talos/ffprocess_win32.py | 6 ++- .../talos/page_load_test/framecycler.html | 45 ++++++++++--------- .../testing/performance/talos/run_tests.py | 16 +++---- .../testing/performance/talos/sample.config | 7 ++- mozilla/testing/performance/talos/tp.py | 2 +- 8 files changed, 55 insertions(+), 46 deletions(-) diff --git a/mozilla/testing/performance/talos/base_profile/localstore.rdf b/mozilla/testing/performance/talos/base_profile/localstore.rdf index 92c6e8a1507..65a921eeda7 100755 --- a/mozilla/testing/performance/talos/base_profile/localstore.rdf +++ b/mozilla/testing/performance/talos/base_profile/localstore.rdf @@ -7,8 +7,8 @@ width="994" height="1010" sizemode="normal" - screenX="432" - screenY="69" /> + screenX="0" + screenY="0" /> diff --git a/mozilla/testing/performance/talos/config.py b/mozilla/testing/performance/talos/config.py index 7e9767c9578..d176bc57de9 100644 --- a/mozilla/testing/performance/talos/config.py +++ b/mozilla/testing/performance/talos/config.py @@ -44,6 +44,9 @@ __author__ = 'annie.sullivan@gmail.com (Annie Sullivan)' OS = r'win32' +BROWSER_HEIGHT = 768 +BROWSER_WIDTH = 1024 + """For some reason, can only get output from dump() in Firefox if it's run through cygwin bash. So here's the path to cygwin. """ @@ -57,19 +60,16 @@ SYNC = r'c:\cygwin\bin\sync' urls with scheme:file to open in new windows, and the preference to open new windows in a tab should be off. """ -BASE_PROFILE_DIR = r'C:\win32\base_profile' - -"""The directory the generated reports go into.""" -REPORTS_DIR = r'c:\extension_perf_reports' +BASE_PROFILE_DIR = r'C:\talos\base_profile' """The path to the file url to load when initializing a new profile""" -INIT_URL = 'file:///c:/win32/initialize.html' +INIT_URL = 'file:///c:/talos/initialize.html' """The path to the file url to load when collecting information from the browser""" -INFO_URL = 'file:///c:/win32/getInfo.html' +INFO_URL = 'file:///c:/talos/getInfo.html' """The path to the file url to load for startup test (Ts)""" -TS_URL = 'file:///c:/win32/startup_test/startup_test.html?begin=' +TS_URL = 'file:///c:/talos/startup_test/startup_test.html?begin=' """Number of times to run startup test (Ts)""" TS_NUM_RUNS = 5 @@ -95,3 +95,4 @@ COUNTERS = ['Private Bytes', 'Working Set', '% Processor Time'] """URL for the results server""" RESULTS_SERVER = 'graphserver.url.here' +RESULTS_LINK = '/bulk.cgi' diff --git a/mozilla/testing/performance/talos/ffprocess_linux.py b/mozilla/testing/performance/talos/ffprocess_linux.py index a806bfd4b3e..46d9e6d2972 100644 --- a/mozilla/testing/performance/talos/ffprocess_linux.py +++ b/mozilla/testing/performance/talos/ffprocess_linux.py @@ -59,9 +59,11 @@ def GenerateFirefoxCommandLine(firefox_path, profile_dir, url): if url: url_arg = '-url %s' % url - cmd = '%s %s %s' % (firefox_path, + cmd = '%s %s %s -width %d -height %d' % (firefox_path, profile_arg, - url_arg) + url_arg, + config.BROWSER_WIDTH, + config.BROWSER_HEIGHT) return cmd diff --git a/mozilla/testing/performance/talos/ffprocess_win32.py b/mozilla/testing/performance/talos/ffprocess_win32.py index 15c227be68f..9330b051f3b 100644 --- a/mozilla/testing/performance/talos/ffprocess_win32.py +++ b/mozilla/testing/performance/talos/ffprocess_win32.py @@ -84,10 +84,12 @@ def GenerateFirefoxCommandLine(firefox_path, profile_dir, url): if url: url_arg = '-url %s' % url - cmd = '%s "%s %s %s"' % (config.CYGWIN, + cmd = '%s "%s %s %s -width %d -height %d"' % (config.CYGWIN, GetCygwinPath(firefox_path), profile_arg, - url_arg) + url_arg, + config.BROWSER_WIDTH, + config.BROWSER_HEIGHT) return cmd diff --git a/mozilla/testing/performance/talos/page_load_test/framecycler.html b/mozilla/testing/performance/talos/page_load_test/framecycler.html index 32efb46e5af..27e7b99d789 100644 --- a/mozilla/testing/performance/talos/page_load_test/framecycler.html +++ b/mozilla/testing/performance/talos/page_load_test/framecycler.html @@ -4,7 +4,7 @@ var NUM_PAGES; var NUM_CYCLES; - var DEFAULT_TIMEOUT = 5000; //how long any given page can take to load + var DEFAULT_TIMEOUT = 25000; //how long any given page can take to load var t; function parseParams() { @@ -124,34 +124,37 @@ var rstring = "__start_page_load_report"; var r = getArrayStats(all); - //dump( - // "(tinderbox dropping follows)\n"+ - // "_x_x_mozilla_page_load,"+avgmed+","+r.max+","+r.min+"\n"+ - // "_x_x_mozilla_page_load_details,avgmedian|"+avgmed+"|average|"+avg.toFixed(2)+"|minimum|"+r.min+"|maximum|"+r.max+"|stddev|"+r.stdd.toFixed(2)+":" - //); + dump( + "__start_tp_report\n" + + "_x_x_mozilla_page_load,"+avgmed+","+r.max+","+r.min+"\n"+ + "_x_x_mozilla_page_load_details,avgmedian|"+avgmed+"|average|"+avg.toFixed(2)+"|minimum|"+r.min+"|maximum|"+r.max+"|stddev|"+r.stdd.toFixed(2)+"\n" + ); for (var i = 0; i < timeVals.length; ++i) { r = getArrayStats(timeVals[i]); fields = pages[i].split('/'); - rstring += "page:" + fields[5] + ":" + r.median.toFixed(2) + "\n"; - //dump( - // '|'+ - // i+';'+ - // pages[i]+';'+ - // r.median+';'+ - // r.mean+';'+ - // r.min+';'+ - // r.max - //); + //rstring += "page:" + fields[5] + ":" + r.median.toFixed(2) + "\n"; + dump( + '|'+ + i+';'+ + //pages[i]+';'+ + fields[5]+';'+ + r.median+';'+ + r.mean+';'+ + r.min+';'+ + r.max + ); for (var j = 0; j < timeVals[i].length; ++j) { - //dump( - // ';'+timeVals[i][j] - //); + dump( + ';'+timeVals[i][j] + ); } + dump("\n") } - rstring += "__end_page_load_report"; + dump("__end_tp_report\n"); + //rstring += "__end_page_load_report"; //alert(rstring); - dump(rstring); + //dump(rstring); } function showReport() { diff --git a/mozilla/testing/performance/talos/run_tests.py b/mozilla/testing/performance/talos/run_tests.py index e36441c03d3..e2866542144 100755 --- a/mozilla/testing/performance/talos/run_tests.py +++ b/mozilla/testing/performance/talos/run_tests.py @@ -59,10 +59,9 @@ import socket socket.setdefaulttimeout(480) import config +import post_file import tp import ts -import post_file - def shortNames(name): if name == "tp_loadtime": @@ -141,7 +140,7 @@ def test_file(filename): sys.stdout.flush() for ts_set in ts_times: if len(ts_set) == 0: - print "FAIL:no ts results:something bad happened:BAD BUILD" + print "FAIL:no ts results, build failed to run:BAD BUILD" sys.exit(0) (res, r_strings, tp_times, tp_counters) = tp.RunPltTests(test_configs, @@ -152,15 +151,14 @@ def test_file(filename): print "finished tp" sys.stdout.flush() - if not res: - print "something bad happened during tp" + print "FAIL:tp did not run to completion" print "FAIL:" + r_strings[0] sys.exit(0) #TODO: place this in its own file #send results to the graph server - # each line of the string is of the format page:page_name:page_loadtime\n + # each line of the string is of the format i;page_name;median;mean;min;max;time vals\n tbox = title url_format = "http://%s/%s" link_format= "%s" @@ -186,8 +184,8 @@ def test_file(filename): i = 0 print "formating results for: loadtime" print "# of values: %d" % len(page_results) - for mypage in page_results: - r = mypage.split(':') + for mypage in page_results[3:]: + r = mypage.split(';') tmpf.write(result_format % (float(r[2]), testname + "_loadtime", tbox, i, date, test_configs[index][3], test_configs[index][4], "discrete", r[1])) i = i+1 @@ -208,7 +206,7 @@ def test_file(filename): file_data = tmpf.read() while True: try: - ret = post_file.post_multipart(config.RESULTS_SERVER, '/bulk.cgi', [("key", "value")], [("filename", filename, file_data) + ret = post_file.post_multipart(config.RESULTS_SERVER, config.RESULTS_LINK, [("key", "value")], [("filename", filename, file_data) ]) except IOError: print "IOError" diff --git a/mozilla/testing/performance/talos/sample.config b/mozilla/testing/performance/talos/sample.config index fc5f196b976..a3af4e3905a 100755 --- a/mozilla/testing/performance/talos/sample.config +++ b/mozilla/testing/performance/talos/sample.config @@ -8,13 +8,13 @@ title: testtitle # Name of profile to test Test profile 1: # Path to Firefox to test - firefox: C:\cygwin\tmp\test\firefox\firefox\firefox.exe + firefox: C:\cygwin\tmp\test\firefox\firefox.exe branch: testbranch branchid: testbranchid - profile_path: C:\win32\base_profile + profile_path: C:\talos\base_profile # Preferences to set in the test (use "preferences : {}" for no prefs) preferences : @@ -25,6 +25,9 @@ Test profile 1: network.proxy.type : 1 network.proxy.http : localhost network.proxy.http_port : 80 + dom.disable_window_flip : true + dom.disable_window_move_resize : true + security.enable_java : false # Extensions to install in test (use "extensions: {}" for none) #extensions: diff --git a/mozilla/testing/performance/talos/tp.py b/mozilla/testing/performance/talos/tp.py index 1b0051351a3..1212846d89c 100755 --- a/mozilla/testing/performance/talos/tp.py +++ b/mozilla/testing/performance/talos/tp.py @@ -67,7 +67,7 @@ elif config.OS == "win32": # Regular expression to get stats for page load test (Tp) -TP_REGEX = re.compile('__start_page_load_report(.*)__end_page_load_report', +TP_REGEX = re.compile('__start_tp_report(.*)__end_tp_report', re.DOTALL | re.MULTILINE) TP_REGEX_FAIL = re.compile('__FAIL(.*)__FAIL', re.DOTALL|re.MULTILINE)