stability patch: lower timeout bar for ts, do not start if tp has failed, bail out if a page takes longer than 5s to load b=381941 r=rhelmer p=anodelman

This commit is contained in:
rhelmer@mozilla.com 2007-05-24 16:48:12 -07:00
Родитель ad77d74620
Коммит 3c0d4771eb
4 изменённых файлов: 30 добавлений и 5 удалений

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

@ -4,6 +4,8 @@
var NUM_PAGES;
var NUM_CYCLES;
var DEFAULT_TIMEOUT = 5000; //how long any given page can take to load
var t;
function parseParams() {
var s = document.location.search.substring(1);
@ -178,19 +180,25 @@
}
}
function loadFail() {
dump("__FAILtimeout:" + frames["content"].document.location.href + "__FAIL");
window.close();
}
function loadPage(i) {
tstart = new Date();
t = setTimeout('loadFail()', DEFAULT_TIMEOUT);
frames["content"].document.location = pages[i];
}
function frameLoad() {
clearTimeout(t);
if (cycle == NUM_CYCLES) {
showReport();
dumpReport();
window.close();
return;
}
var tend = new Date();
var href = frames["content"].document.location.href;
if (href == "about:blank")

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

@ -139,8 +139,12 @@ def test_file(filename):
print "finished ts"
sys.stdout.flush()
for ts_set in ts_times:
if len(ts_set) == 0:
print "FAIL:no ts results:something bad happened:BAD BUILD"
sys.exit(0)
(r_strings, tp_times, tp_counters) = tp.RunPltTests(test_configs,
(res, r_strings, tp_times, tp_counters) = tp.RunPltTests(test_configs,
config.TP_NUM_CYCLES,
config.COUNTERS,
config.TP_RESOLUTION)
@ -149,6 +153,11 @@ def test_file(filename):
sys.stdout.flush()
if not res:
print "something bad happened during tp"
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

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

@ -68,6 +68,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',
re.DOTALL | re.MULTILINE)
TP_REGEX_FAIL = re.compile('__FAIL(.*)__FAIL', re.DOTALL|re.MULTILINE)
def RunPltTests(profile_configs,
@ -96,7 +97,8 @@ def RunPltTests(profile_configs,
[{"counter1": [1, 2, 3], "counter2":[4,5,6]},
{"counter1":[1,3,5], "counter2":[2,4,6]}]
"""
res = 0
counter_data = []
plt_results = []
results_string = []
@ -153,6 +155,12 @@ def RunPltTests(profile_configs,
(bytes, current_output) = ffprocess.NonBlockingReadProcessOutput(handle)
output += current_output
match = TP_REGEX.search(output)
if match:
rstring += match.group(1)
plt_results.append(match.group(1))
res = 1
break
match = TP_REGEX_FAIL.search(output)
if match:
rstring += match.group(1)
plt_results.append(match.group(1))
@ -177,4 +185,4 @@ def RunPltTests(profile_configs,
counter_data.append(counts)
results_string.append(rstring)
return (results_string, plt_results, counter_data)
return (res, results_string, plt_results, counter_data)

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

@ -136,7 +136,7 @@ def RunStartupTests(profile_configs, num_runs):
ffprofile.InitializeNewProfile(config[2], profile_dir)
# Run the startup tests for this profile and log the results.
times = RunStartupTest(config[2], profile_dir, 5, 30)
times = RunStartupTest(config[2], profile_dir, 5, 10)
all_times.append(times)
# Delete the temp profile directory. Make it writeable first,