mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
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:
parent
db7f83d1b0
commit
f169efa91a
@ -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};
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user