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

[Xen-devel] [OSSTEST PATCH 19/25] sg-report-host-history: Use a hash for hosts



This will allow deduplication.  No functional change other than a
change to the order of processing.

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

diff --git a/sg-report-host-history b/sg-report-host-history
index 5a3f8be..8a4d40f 100755
--- a/sg-report-host-history
+++ b/sg-report-host-history
@@ -249,7 +249,13 @@ $dbh_tests->do("SET LOCAL enable_seqscan=false");
 # of the runvars table, rather than walking backwards through the
 # flights until it has what we've told it is enough.
 
+our %hosts;
+
 foreach my $host (@ARGV) {
+    $hosts{$host}++;
+}
+
+foreach my $host (sort keys %hosts) {
     db_retry($dbh_tests, [qw(flights)], sub {
        reporthost $host;
     });
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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