[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 12/13] sg-report-host-history: Cache runvar queries (power information)
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@xxxxxxxxxxxxx> --- sg-report-host-history | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sg-report-host-history b/sg-report-host-history index 7c2116d3..a11b00a0 100755 --- a/sg-report-host-history +++ b/sg-report-host-history @@ -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) { -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |