print $fh " -->\n";
}
+sub cache_report_stats ($) {
+ my ($what) = @_;
+ print ::DEBUG "CACHE $what read=$rows_previous hits $rows_hit/$rows_today";
+ for my $cachekey (sort keys %q_count) {
+ my $total = $q_count{$cachekey};
+ my $hits = $total - ($q_misses{$cachekey} // 0);
+ print ::DEBUG " $cachekey=$hits/$total";
+ }
+ print ::DEBUG "\n";
+}
+
cache_set_key_cols(qw(flight job status name));
sub computeflightsrange () {
push @rows, { %$jr, %$endedrow };
}
- print DEBUG "CACHE $hostname $rows_hit / ".(scalar @rows)
- ." of ".(scalar %cache)."\n";
-
@rows = sort { $b->{finished} <=> $a->{finished} } @rows;
print DEBUG "SORTED\n";
rename "$html_file.new", "$html_file" or die "$html_file $!"
if $doinstall;
- print DEBUG "HOST CACHE RQ $runvarq_hits / ".
- ($runvarq_hits+$runvarq_misses)."\n";
+ cache_report_stats("$hostname");
}
foreach my $host (@ARGV) {
mainquery($host);
reporthost $host;
});
- print DEBUG "JQ CACHE ".($jqtotal-$jqcachemisses)." / $jqtotal\n";
exit(0);
}
print DEBUG "SPAWNED [$pid] $host\n";