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

[OSSTEST PATCH 16/60] history reporting (nfc): Record more row-specific stats


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Fri, 14 Aug 2020 18:21:21 +0100
  • Authentication-results: esa3.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:22:49 +0000
  • Ironport-sdr: DfLho/TOm7Qfkx+V8vqWXMYGyKeeFomewX29ayXdO5LBqKUZYxkpYuVP7/NQiMaEvQdDiKk0Qi gr4rrujOCQF5PqUaiqJISlPIFS6scS5B7nbgA9gRO4smqg3ygMgXJPzRuGy/cAOfey+0Id4suD NCtnA0Q2n6k/wBWVVtzO8YN6spdxGVRWy9or4wV/ulMhnoROiqYKx7CTkYcElrgjdDiOe9im90 5tLilPOwmcKDYGRcEw+wiEDmtiZCere0HyzW+toZ8I6MGAEJMLnqZUKOExOdSNHSqIexfPLNox HtE=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Prep work.  Nothing uses these yet.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 sg-report-host-history | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sg-report-host-history b/sg-report-host-history
index 07e549a0..32cc883d 100755
--- a/sg-report-host-history
+++ b/sg-report-host-history
@@ -83,6 +83,10 @@ our %cache;
 our %q_count;
 our %q_misses;
 
+our $rows_previous = 0;
+our $rows_today = 0;
+our $rows_hit = 0;
+
 sub cache_set_key_cols { @cache_row_key_cols = @_; }
 
 sub cache_row_key ($) {
@@ -128,6 +132,7 @@ sub cache_read_previous ($) {
     }
     %cache = ();
     for (;;) {
+       $rows_previous++;
         $_ = <H> // last;
         next unless m{^\<\!-- osstest-report-reuseable (.*)--\>$};
        my $jr = {};
@@ -151,6 +156,7 @@ sub cache_read_previous ($) {
 sub cache_row_lookup_prep ($) {
     my ($jrr) = @_;
 
+    $rows_today++;
     my $cacherow = $cache{cache_row_key($$jrr)};
     if ($cacherow) {
        $$jrr = $cacherow;
@@ -313,7 +319,6 @@ END
     # The contents of $jr for each job is cached across runs.
 
     my @rows;
-    my $rows_hit = 0;
     foreach my $jr (@$inrows) {
        #print DEBUG "JOB $jr->{flight}.$jr->{job} ";
 
-- 
2.11.0




 


Rackspace

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