From a5f504f1838b68482d30afac77443f81d79c2a58 Mon Sep 17 00:00:00 2001 From: "mcafee%netscape.com" Date: Tue, 20 Nov 2001 06:30:18 +0000 Subject: [PATCH] Removing server-side pageloader data reporting, use client-side scrape mechanism git-svn-id: svn://10.0.0.236/trunk@108561 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/tinderbox/pageloader.pl | 96 ------------------------ 1 file changed, 96 deletions(-) delete mode 100755 mozilla/webtools/tinderbox/pageloader.pl diff --git a/mozilla/webtools/tinderbox/pageloader.pl b/mozilla/webtools/tinderbox/pageloader.pl deleted file mode 100755 index 47d0c5cc7cc..00000000000 --- a/mozilla/webtools/tinderbox/pageloader.pl +++ /dev/null @@ -1,96 +0,0 @@ -#! /usr/bonsaitools/bin/perl -# -*- Mode: perl; indent-tabs-mode: nil -*- -# -# The contents of this file are subject to the Mozilla Public License -# Version 1.1 (the "License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -# License for the specific language governing rights and limitations -# under the License. -# -# The Original Code is Tinderbox -# -# The Initial Developer of the Original Code is Netscape Communications -# Corporation. Portions created by Netscape are Copyright (C) 1999 -# Netscape Communications Corporation. All Rights Reserved. -# -# Contributor(s): Chris McAfee - -# -# pageloader.pl - Process pageloader data from jrgm's pageloader tool. -# Write data to $tree/pageloader.dat in the following format, -# -# || -# - -sub usage { - warn "./pageloader.pl "; -} - -use FileHandle; - -# This is for gunzip (Should add a configure script to handle this). -$ENV{PATH} .= ":/usr/local/bin"; - -unless ($#ARGV == 1) { - &usage; - die "Error: Wrong number of arguments\n"; -} - -($tree, $logfile) = @ARGV; - -die "Error: No tree named $tree" unless -r "$tree/treedata.pl"; -require "$tree/treedata.pl"; - -# Seach the build log for the pageloader data -# -$fh = new FileHandle "gunzip -c $tree/$logfile |" - or die "Unable to open $tree/$logfile\n"; -my $pageloader_time = 0; -$pageloader_time = find_pageloader_data($fh); -$fh->close; - -die "No pageloader data found in log.\n" unless $pageloader_time; - -print "pageloader_time = $pageloader_time\n"; - -# Save the pageloader data to 'pageloader.dat' -# -open PAGELOADER, ">>$tree/pageloader.dat" or die "Unable to open $tree/pageloader.dat"; -print PAGELOADER "$logfile|$pageloader_time\n"; -close PAGELOADER; - - -# end of main -#============================================================ - -sub find_pageloader_data { - my ($fh) = $_[0]; - local $_; - my $inPageloaderStats = 0; - - # Search for "Starting Page Load Test" token, then - # start looking for "_x_x_mozilla_page_load". bloat.pl - # does this, I think there was some attempt at being - # smart about how the logs get parsed, not sure if this - # is needed now. - while (<$fh>) { - if ($inPageloaderStats and /^ _x_x_mozilla_page_load/) { - # Line format: - # _x_x_mozilla_page_load,,, - # - chomp; - print "\$_ = $_\n"; - @findLine = split(/,/,$_); - - # Pick off 2nd item, average - return $findLine[1]; - } elsif (not $inPageloaderStats and /^ Starting Page Load Test/) { - $inPageloaderStats = 1; - } - } - return (); -}