[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH 45/60] history reporting (nfc): Provide cache_set_task_print


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Fri, 14 Aug 2020 18:21:50 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 14 Aug 2020 17:26:47 +0000
  • Ironport-sdr: xzcpiXWt2MDVKaH0+t+J4BZz9NNgtQGsKmhYOQJLttcwgGR3o5z8fbi0gMFW2gQn7P7+MJHKEK ER6TZN8QdXnN0vZBVX5IgVQVzQY4jJxeZp8E4tLTuptYKpLmdY5jqhTUT7ptP7y344zVRm74s0 d/Bxrv6FkTecUoP3127/WnShj4n7CrEK77uM5WOCiHcIexj6oVUmooTZCLD8U1/ZP46GqHVVYx Ak3cb7sIiBvOZWicDdAVaH2me1QkHnZfw45LCM+H0LvpcfOtTtd01/CcMCZf9PENghJf4w/9kw A2E=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.