Switching to client-side pageload test reporting. a=jrgm

This commit is contained in:
cltbld%netscape.com 2002-04-10 03:38:40 +00:00
parent e62cf2fe9d
commit e42ead61c4

View File

@ -23,7 +23,7 @@ use Config; # for $Config{sig_name} and $Config{sig_num}
use File::Find ();
$::UtilsVersion = '$Revision: 1.158 $ ';
$::UtilsVersion = '$Revision: 1.159 $ ';
package TinderUtils;
@ -1128,31 +1128,74 @@ sub run_all_tests {
# bug to push this out to mozilla.org is:
# http://bugzilla.mozilla.org/show_bug.cgi?id=75073
if ($Settings::LayoutPerformanceTest and $test_result eq 'success') {
my $layout_time;
my $layout_time_details;
my $test_name = "LayoutPerformanceTest";
my $binary_log = "$build_dir/$test_name.log";
my $url = "http://$Settings::pageload_server/page-loader/loader.pl?delay=1000&nocache=0&maxcyc=4&timeout=$Settings::LayoutPerformanceTestPageTimeout&auto=1";
# Settle OS.
run_system_cmd("sync; sleep 10", 35);
# Settle OS.
run_system_cmd("sync; sleep 10", 35);
# XXX we should use a variable to get the host for the page
# load tests instead of hard-coding to localhost.
$test_result =
FileBasedTest("LayoutPerformanceTest", $build_dir, $binary_dir,
$binary . " -P $Settings::MozProfileName \"http://$Settings::pageload_server/page-loader/loader.pl?delay=1000&nocache=0&maxcyc=4&timeout=$Settings::LayoutPerformanceTestPageTimeout&auto=1\"",
$Settings::LayoutPerformanceTestTimeout,
"_x_x_mozilla_page_load", 1, 0);
$layout_time = AliveTestReturnToken($test_name,
$build_dir,
$binary,
" -P $Settings::MozProfileName \"$url\"",
$Settings::LayoutPerformanceTestTimeout,
"_x_x_mozilla_page_load",
",");
if($layout_time) {
chomp($layout_time);
my @times = split(',', $layout_time);
$layout_time = $times[0]; # Set layout time to first number that we scraped.
} else {
print_log "TinderboxPrint:Tp:[CRASH]\n";
# Run the test a second time. Getting intermittent crashes, these
# are expensive to wait, a 2nd run that is successful is still useful.
# Sorry for the cut & paste. -mcafee
if($test_result eq 'testfailed') {
print_log "TinderboxPrint:Tp:[CRASH]\n";
$test_result =
FileBasedTest("LayoutPerformanceTest", $build_dir, $binary_dir,
$binary . " -P $Settings::MozProfileName \"http://$Settings::pageload_server/page-loader/loader.pl?delay=1000&nocache=0&maxcyc=4&timeout=$Settings::LayoutPerformanceTestPageTimeout&auto=1\"",
$Settings::LayoutPerformanceTestTimeout,
"_x_x_mozilla_page_load", 1, 0);
$layout_time = AliveTestReturnToken($test_name,
$build_dir,
$binary,
" -P $Settings::MozProfileName \"$url\"",
$Settings::LayoutPerformanceTestTimeout,
"_x_x_mozilla_page_load",
",");
# Print failure message if we fail 2nd time.
unless($layout_time) {
print_log "TinderboxPrint:Tp:[CRASH]\n";
}
}
# Set test status.
if($layout_time) {
$test_result = 'success';
} else {
$test_result = 'testfailed';
}
if($test_result eq 'success') {
print_log "TinderboxPrint:" .
"<a title=\"Avg of the median per url pageload time\" href=\"http://$Settings::results_server/graph/query.cgi?testname=pageload&tbox=" .
::hostname() . "&autoscale=1&days=7&avg=1\">Tp:$layout_time" . "ms</a>\n";
# Pull out detail data from log.
my $raw_data = extract_token_from_file($binary_log, "_x_x_mozilla_page_load_details", ",");
chomp($raw_data);
if($Settings::TestsPhoneHome) {
send_results_to_server($layout_time, $raw_data, "pageload", ::hostname());
}
}
}
# xul window open test.
#
if ($Settings::XULWindowOpenTest and $test_result eq 'success') {