- 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
This commit is contained in:
rhelmer@mozilla.com 2007-06-21 19:13:25 -07:00
Родитель 641454b56d
Коммит 6352c53dc2
8 изменённых файлов: 55 добавлений и 46 удалений

Просмотреть файл

@ -7,8 +7,8 @@
width="994"
height="1010"
sizemode="normal"
screenX="432"
screenY="69" />
screenX="0"
screenY="0" />
<RDF:Description RDF:about="chrome://browser/content/browser.xul">
<NC:persist RDF:resource="chrome://browser/content/browser.xul#main-window"/>
<NC:persist RDF:resource="chrome://browser/content/browser.xul#toolbar-menubar"/>

Просмотреть файл

@ -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'

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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() {

Просмотреть файл

@ -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= "<a href = \"%s\">%s</a>"
@ -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"

Просмотреть файл

@ -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:

Просмотреть файл

@ -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)