|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 45/60] history reporting (nfc): Provide cache_set_task_print
This takes a string which gets added to the cache messages. This
will allow us to distinguish the output from different processes
when using parallel by fork.
Nothing sets this yet.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
Osstest/HistoryReport.pm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Osstest/HistoryReport.pm b/Osstest/HistoryReport.pm
index 5d2c83b7..bfbee28c 100644
--- a/Osstest/HistoryReport.pm
+++ b/Osstest/HistoryReport.pm
@@ -29,6 +29,7 @@ BEGIN {
@ISA = qw(Exporter);
@EXPORT = qw(
cache_set_key_cols
+ cache_set_task_print
cache_read_previous
cache_row_lookup_prep
cacheable_query
@@ -46,6 +47,7 @@ use POSIX;
our @key_cols;
+our $taskprint='';
our %cache;
our @previous;
@@ -91,6 +93,7 @@ our $rows_extra = 0;
sub cache_set_key_cols { @key_cols = @_; }
+sub cache_set_task_print ($) { ($taskprint)=@_; $taskprint =~ s/\s*$/ /; }
sub key ($) {
my ($jr) = @_;
@@ -162,7 +165,7 @@ sub cache_row_lookup_prep ($) {
$$jrr = $cacherow;
$rows_hit++;
} else {
- print ::DEBUG "CACHE MISS ",
+ print ::DEBUG "CACHE MISS $taskprint",
(join " ", map { $$jrr->{$_} } @key_cols), "\n";
}
}
@@ -209,7 +212,7 @@ sub cache_finish ($$) {
}
print ::DEBUG
- "CACHE $what read=$nprevious hits $rows_hit/$rows_today";
+ "CACHE $taskprint$what read=$nprevious hits $rows_hit/$rows_today";
for my $cachekey (sort keys %q_count) {
my $total = $q_count{$cachekey};
my $hits = $total - ($q_misses{$cachekey} // 0);
--
2.11.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |