@@ -322,6 +322,9 @@ END
my $alternate = 0;
my $wrote = 0;
+ my $runvarq_hits = 0;
+ my $runvarq_misses = 0;
+
foreach my $jr (@rows) {
if ($wrote++ >= $limit) {
$write_cache_entry->($jr);
@@ -372,7 +375,11 @@ END
print H "<td $ri->{ColourAttr}>$ri->{Content}</td>\n";
my %powers;
- do {
+ if ($jr->{'%p'}) {
+ %powers = %{ $jr->{'%p'} };
+ $runvarq_hits++;
+ } else {
+ $runvarq_misses++;
$jrunvarq->execute($jr->{flight}, $jr->{job}, $ident);
my %runvars;
while (my ($n, $v) = $jrunvarq->fetchrow_array()) {
@@ -383,7 +390,8 @@ END
next unless $r =~ m{^\Q${ident}\E_power_};
$powers{$'} = $runvars{$r};
}
- };
+ $jr->{'%p'} = { %powers };
+ }
my $skipped = 0;
my $any_power = 0;
my $pr_power_colour = sub {
@@ -429,6 +437,9 @@ END
close H or die $!;
rename "$html_file.new", "$html_file" or die "$html_file $!"
if $doinstall;
+
+ print DEBUG "HOST CACHE RQ $runvarq_hits / ".
+ ($runvarq_hits+$runvarq_misses)."\n";
}
foreach my $host (@ARGV) {
This per-job processing was not done with jobquery, so was not cached. We assign it the cache letter `p'. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> --- sg-report-host-history | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)