[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 54/60] sg-report-job-history: Cache osstestrevs
No logical change. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- sg-report-job-history | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sg-report-job-history b/sg-report-job-history index d5e37bcd..48dc2f57 100755 --- a/sg-report-job-history +++ b/sg-report-job-history @@ -260,17 +260,20 @@ END my $hosts = join ", ", map { $r->{Hosts}{$_} // "-" } @hostvarcols; my $hosts_colour = report_altchangecolour(\$alt_hosts, $hosts); print H "<td $hosts_colour>".encode_entities($hosts)."</td>\n"; - my %osstestrevs; - $osstestverq->execute($r->{Flight}{flight}); - while (my ($harness) = $osstestverq->fetchrow_array()) { - $osstestrevs{$harness}++; - } + my $osstestrevmap = cacheable_fn($r->{Flight}, 'o', sub { + my %osstestrevs; + $osstestverq->execute($r->{Flight}{flight}); + while (my ($harness) = $osstestverq->fetchrow_array()) { + $osstestrevs{$harness}++; + } + \%osstestrevs; + }); my $osstestrevs = join ' ', map { s/^([0-9a-f]{12})[0-9a-f]+\b/$1/; "<kbd>".encode_entities($_)."</kbd>"; } - sort keys %osstestrevs; + sort keys %$osstestrevmap; my $osstest_colour = report_altchangecolour(\$alt_osstest, $osstestrevs); print H "<td $osstest_colour>$osstestrevs</td>\n"; foreach my $i (0..$#rev_grid_cols) { -- 2.11.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |