From: Ian Jackson Subject: [OSSTEST PATCH 19/25] sg-report-host-history: Use a hash for hosts Date: Wed, 17 Jun 2015 17:45:15 +0100 Message-ID: <1434559521-8751-20-git-send-email-ian.jackson@eu.citrix.com> References: <1434559521-8751-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z5GTN-0004hv-Px for xen-devel@lists.xenproject.org; Wed, 17 Jun 2015 16:45:57 +0000 In-Reply-To: <1434559521-8751-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org This will allow deduplication. No functional change other than a change to the order of processing. Signed-off-by: Ian Jackson --- 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