зеркало из https://github.com/mozilla/pjs.git
- 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:
Родитель
641454b56d
Коммит
6352c53dc2
|
@ -7,8 +7,8 @@
|
||||||
width="994"
|
width="994"
|
||||||
height="1010"
|
height="1010"
|
||||||
sizemode="normal"
|
sizemode="normal"
|
||||||
screenX="432"
|
screenX="0"
|
||||||
screenY="69" />
|
screenY="0" />
|
||||||
<RDF:Description RDF:about="chrome://browser/content/browser.xul">
|
<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#main-window"/>
|
||||||
<NC:persist RDF:resource="chrome://browser/content/browser.xul#toolbar-menubar"/>
|
<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'
|
OS = r'win32'
|
||||||
|
|
||||||
|
BROWSER_HEIGHT = 768
|
||||||
|
BROWSER_WIDTH = 1024
|
||||||
|
|
||||||
"""For some reason, can only get output from dump() in Firefox if
|
"""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.
|
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
|
urls with scheme:file to open in new windows, and the preference to open
|
||||||
new windows in a tab should be off.
|
new windows in a tab should be off.
|
||||||
"""
|
"""
|
||||||
BASE_PROFILE_DIR = r'C:\win32\base_profile'
|
BASE_PROFILE_DIR = r'C:\talos\base_profile'
|
||||||
|
|
||||||
"""The directory the generated reports go into."""
|
|
||||||
REPORTS_DIR = r'c:\extension_perf_reports'
|
|
||||||
|
|
||||||
"""The path to the file url to load when initializing a new 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"""
|
"""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)"""
|
"""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)"""
|
"""Number of times to run startup test (Ts)"""
|
||||||
TS_NUM_RUNS = 5
|
TS_NUM_RUNS = 5
|
||||||
|
@ -95,3 +95,4 @@ COUNTERS = ['Private Bytes', 'Working Set', '% Processor Time']
|
||||||
|
|
||||||
"""URL for the results server"""
|
"""URL for the results server"""
|
||||||
RESULTS_SERVER = 'graphserver.url.here'
|
RESULTS_SERVER = 'graphserver.url.here'
|
||||||
|
RESULTS_LINK = '/bulk.cgi'
|
||||||
|
|
|
@ -59,9 +59,11 @@ def GenerateFirefoxCommandLine(firefox_path, profile_dir, url):
|
||||||
if url:
|
if url:
|
||||||
url_arg = '-url %s' % url
|
url_arg = '-url %s' % url
|
||||||
|
|
||||||
cmd = '%s %s %s' % (firefox_path,
|
cmd = '%s %s %s -width %d -height %d' % (firefox_path,
|
||||||
profile_arg,
|
profile_arg,
|
||||||
url_arg)
|
url_arg,
|
||||||
|
config.BROWSER_WIDTH,
|
||||||
|
config.BROWSER_HEIGHT)
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -84,10 +84,12 @@ def GenerateFirefoxCommandLine(firefox_path, profile_dir, url):
|
||||||
if url:
|
if url:
|
||||||
url_arg = '-url %s' % 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),
|
GetCygwinPath(firefox_path),
|
||||||
profile_arg,
|
profile_arg,
|
||||||
url_arg)
|
url_arg,
|
||||||
|
config.BROWSER_WIDTH,
|
||||||
|
config.BROWSER_HEIGHT)
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
var NUM_PAGES;
|
var NUM_PAGES;
|
||||||
var NUM_CYCLES;
|
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;
|
var t;
|
||||||
|
|
||||||
function parseParams() {
|
function parseParams() {
|
||||||
|
@ -124,34 +124,37 @@
|
||||||
var rstring = "__start_page_load_report";
|
var rstring = "__start_page_load_report";
|
||||||
|
|
||||||
var r = getArrayStats(all);
|
var r = getArrayStats(all);
|
||||||
//dump(
|
dump(
|
||||||
// "(tinderbox dropping follows)\n"+
|
"__start_tp_report\n" +
|
||||||
// "_x_x_mozilla_page_load,"+avgmed+","+r.max+","+r.min+"\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)+":"
|
"_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) {
|
for (var i = 0; i < timeVals.length; ++i) {
|
||||||
r = getArrayStats(timeVals[i]);
|
r = getArrayStats(timeVals[i]);
|
||||||
fields = pages[i].split('/');
|
fields = pages[i].split('/');
|
||||||
rstring += "page:" + fields[5] + ":" + r.median.toFixed(2) + "\n";
|
//rstring += "page:" + fields[5] + ":" + r.median.toFixed(2) + "\n";
|
||||||
//dump(
|
dump(
|
||||||
// '|'+
|
'|'+
|
||||||
// i+';'+
|
i+';'+
|
||||||
// pages[i]+';'+
|
//pages[i]+';'+
|
||||||
// r.median+';'+
|
fields[5]+';'+
|
||||||
// r.mean+';'+
|
r.median+';'+
|
||||||
// r.min+';'+
|
r.mean+';'+
|
||||||
// r.max
|
r.min+';'+
|
||||||
//);
|
r.max
|
||||||
|
);
|
||||||
for (var j = 0; j < timeVals[i].length; ++j) {
|
for (var j = 0; j < timeVals[i].length; ++j) {
|
||||||
//dump(
|
dump(
|
||||||
// ';'+timeVals[i][j]
|
';'+timeVals[i][j]
|
||||||
//);
|
);
|
||||||
}
|
}
|
||||||
|
dump("\n")
|
||||||
}
|
}
|
||||||
rstring += "__end_page_load_report";
|
dump("__end_tp_report\n");
|
||||||
|
//rstring += "__end_page_load_report";
|
||||||
//alert(rstring);
|
//alert(rstring);
|
||||||
dump(rstring);
|
//dump(rstring);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showReport() {
|
function showReport() {
|
||||||
|
|
|
@ -59,10 +59,9 @@ import socket
|
||||||
socket.setdefaulttimeout(480)
|
socket.setdefaulttimeout(480)
|
||||||
|
|
||||||
import config
|
import config
|
||||||
|
import post_file
|
||||||
import tp
|
import tp
|
||||||
import ts
|
import ts
|
||||||
import post_file
|
|
||||||
|
|
||||||
|
|
||||||
def shortNames(name):
|
def shortNames(name):
|
||||||
if name == "tp_loadtime":
|
if name == "tp_loadtime":
|
||||||
|
@ -141,7 +140,7 @@ def test_file(filename):
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
for ts_set in ts_times:
|
for ts_set in ts_times:
|
||||||
if len(ts_set) == 0:
|
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)
|
sys.exit(0)
|
||||||
|
|
||||||
(res, r_strings, tp_times, tp_counters) = tp.RunPltTests(test_configs,
|
(res, r_strings, tp_times, tp_counters) = tp.RunPltTests(test_configs,
|
||||||
|
@ -152,15 +151,14 @@ def test_file(filename):
|
||||||
print "finished tp"
|
print "finished tp"
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|
||||||
if not res:
|
if not res:
|
||||||
print "something bad happened during tp"
|
print "FAIL:tp did not run to completion"
|
||||||
print "FAIL:" + r_strings[0]
|
print "FAIL:" + r_strings[0]
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
#TODO: place this in its own file
|
#TODO: place this in its own file
|
||||||
#send results to the graph server
|
#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
|
tbox = title
|
||||||
url_format = "http://%s/%s"
|
url_format = "http://%s/%s"
|
||||||
link_format= "<a href = \"%s\">%s</a>"
|
link_format= "<a href = \"%s\">%s</a>"
|
||||||
|
@ -186,8 +184,8 @@ def test_file(filename):
|
||||||
i = 0
|
i = 0
|
||||||
print "formating results for: loadtime"
|
print "formating results for: loadtime"
|
||||||
print "# of values: %d" % len(page_results)
|
print "# of values: %d" % len(page_results)
|
||||||
for mypage in page_results:
|
for mypage in page_results[3:]:
|
||||||
r = mypage.split(':')
|
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]))
|
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
|
i = i+1
|
||||||
|
|
||||||
|
@ -208,7 +206,7 @@ def test_file(filename):
|
||||||
file_data = tmpf.read()
|
file_data = tmpf.read()
|
||||||
while True:
|
while True:
|
||||||
try:
|
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:
|
except IOError:
|
||||||
print "IOError"
|
print "IOError"
|
||||||
|
|
|
@ -8,13 +8,13 @@ title: testtitle
|
||||||
# Name of profile to test
|
# Name of profile to test
|
||||||
Test profile 1:
|
Test profile 1:
|
||||||
# Path to Firefox to test
|
# Path to Firefox to test
|
||||||
firefox: C:\cygwin\tmp\test\firefox\firefox\firefox.exe
|
firefox: C:\cygwin\tmp\test\firefox\firefox.exe
|
||||||
|
|
||||||
branch: testbranch
|
branch: testbranch
|
||||||
|
|
||||||
branchid: testbranchid
|
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 to set in the test (use "preferences : {}" for no prefs)
|
||||||
preferences :
|
preferences :
|
||||||
|
@ -25,6 +25,9 @@ Test profile 1:
|
||||||
network.proxy.type : 1
|
network.proxy.type : 1
|
||||||
network.proxy.http : localhost
|
network.proxy.http : localhost
|
||||||
network.proxy.http_port : 80
|
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 to install in test (use "extensions: {}" for none)
|
||||||
#extensions:
|
#extensions:
|
||||||
|
|
|
@ -67,7 +67,7 @@ elif config.OS == "win32":
|
||||||
|
|
||||||
|
|
||||||
# Regular expression to get stats for page load test (Tp)
|
# 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)
|
re.DOTALL | re.MULTILINE)
|
||||||
TP_REGEX_FAIL = re.compile('__FAIL(.*)__FAIL', re.DOTALL|re.MULTILINE)
|
TP_REGEX_FAIL = re.compile('__FAIL(.*)__FAIL', re.DOTALL|re.MULTILINE)
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче