Adding basic scrape functionality. Pick off TinderboxPrint: token and print the argument in the corresponding build box. Currently limited to one line, multi-line change coming next.

This commit is contained in:
mcafee%netscape.com 2001-11-03 00:50:13 +00:00
parent db7f83d1b0
commit f169efa91a
2 changed files with 34 additions and 0 deletions

View File

@ -407,6 +407,20 @@ BEGIN {
print sprintf "<br>Ts:%4.2fs", $startup_time/1000;
}
# Scrape data
if (defined $td->{scrape}{$logfile}) {
my ($scrape_data)
= @{ $td->{startup}{$logfile} };
# ex: Tp:5.45s
print sprintf "<br>$scrape_data";
}
# Scrape data
#if (defined $td->{scrape}{$logfile}) {
# my @scrape_data = @{$td->{scrape}{$logfile}};
# print "<br>@scrape_data[0],@scrape_data[1]";
#}
# Warnings
if (defined $td->{warnings}{$logfile}) {
my ($warning_count) = $td->{warnings}{$logfile};

View File

@ -145,6 +145,7 @@ sub tb_load_data {
$td->{bloaty} = load_bloaty($td);
$td->{pageloader} = load_pageloader($td);
$td->{startup} = load_startup($td);
$td->{scrape} = load_scrape($td);
$td->{warnings} = load_warnings($td);
return $td;
@ -469,6 +470,25 @@ sub load_startup {
return $startup;
}
# Load data about scrape data.
# File format: <logfile>|<aaa>|<bbb>|...
#
sub load_scrape {
my $treedata = $_[0];
local $_;
my $scrape = {};
open(BLOATLOG, "<$treedata->{name}/scrape.dat");
while (<BLOATLOG>) {
chomp;
my ($logfile, $scrape_data) = split /\|/;
$scrape->{$logfile} = [ $scrape_data ];
}
return $scrape;
}
# Load data about build warnings
# File format: <logfile>|<warning_count>