From nobody Mon Feb 9 19:30:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=eu.citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1573239100; cv=none; d=zoho.com; s=zohoarc; b=azUJ4dl8bmm5K2fU6HYWBfCD57H/6kZiokhucgzYip0Kx8M5OxoNgeq70i/HTXJTP4o2SMqBJeGiv2H4wmHn0tjBpCYGYx2cNdSXPkXu8gxY3txCbzSyg1yiundMmTtLKwvKlvc7oX/TyaOQSBN7XvFOG13fg1xVN59EgbIJusI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573239100; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nv6DQ95Lgo6iLeLF7NdDPjCMeMrD+zEIJDNDAbSgTMs=; b=TOvY2ihgW9uE9h+OSLhbjkjTTcjdHqFE45PFpy1wJmUP5lCVgCX3Ty/EWXlchWPJ70uh9QYyDNItY4VOa/a0/iKJlpJ+1x4RcRRb7Ot3U6G3RdvMm4D2A57/C7dIOVGt81tS3Bn+sDjU9Z2Fo7TSEO6/tHWt9LXdE0V1U5gLhbY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1573239100392225.4071363250149; Fri, 8 Nov 2019 10:51:40 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iT9LG-00081o-FG; Fri, 08 Nov 2019 18:50:42 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iT9LF-00080l-6I for xen-devel@lists.xenproject.org; Fri, 08 Nov 2019 18:50:41 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 97d92b90-0258-11ea-a1d6-12813bfff9fa; Fri, 08 Nov 2019 18:50:12 +0000 (UTC) X-Inumbo-ID: 97d92b90-0258-11ea-a1d6-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1573239012; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=P3Z8VMI+icST3yAdSjUhdxH7tSRxS6c72r762JBG3Tk=; b=J/CXcPNmmYkXGipgHDFgRFowou8Va7rYJUhcwHSU6dZMHVoRukgWDcij P0JNA1kGgG1hdWvJKPnLRzPEVtnaVE2XcS8MJloHN4/igogeUbTKHqsld ENgCPcUKxqEKeXD864HtZV0QSY2sUWRYVvsK7db68k2x8CBgA1ck57Gsh c=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@eu.citrix.com; spf=Pass smtp.mailfrom=Ian.Jackson@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of ian.jackson@eu.citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of Ian.Jackson@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="Ian.Jackson@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 6jzBjl6l+FJO/3D7FV/XvqJUdnOGvfUJRNRCwxoSEXHqzRbh0T86uz7J+WzMj9VLirU7Pm/Cq7 tj2NVZ5UKGIjojWxclJK8tnl+cIOiJ3/wpidSJXDVA/fj1bRA6htrToOxQg1dCkUOBwHROy9rZ VjluPZdx9kics4x39L6qItReexPc5i6G7z2khnnNXaL13utqWC95zv1yrSK0FQn0KjTvE2E1BV fGDelmpun35kr4AoYzjUaBMmyI8ysSJUELlFxZUg6hTcbcV1tiOvQ0z5b3mCGBaSXGrkZaf1zP ALs= X-SBRS: 2.7 X-MesageID: 8482904 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.68,282,1569297600"; d="scan'208";a="8482904" From: Ian Jackson To: Date: Fri, 8 Nov 2019 18:49:55 +0000 Message-ID: <20191108185001.3319-8-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191108185001.3319-1-ian.jackson@eu.citrix.com> References: <20191108185001.3319-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 07/13] sg-report-host-history: Store per-job query results in %$jr X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) jobquery now looks for the subquery results in %$jr, under the cachekey, and only runs the query if it's not found. It then stores the value. We are going to persist the contents of %$jr across runs, and then this will avoid rerunning queries needlessly. No functional change yet. Signed-off-by: Ian Jackson --- sg-report-host-history | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/sg-report-host-history b/sg-report-host-history index 4c40cbec..8767b25d 100755 --- a/sg-report-host-history +++ b/sg-report-host-history @@ -109,11 +109,21 @@ END print DEBUG "MINFLIGHT $minflight\n"; } =20 +our $jqcachemisses =3D 0; +our $jqtotal =3D 0; + sub jobquery ($$$) { my ($q, $jr, $cachekey) =3D @_; - my ($q, $jr) =3D @_; - $q->execute($jr->{flight}, $jr->{job}); - return $q->fetchrow_hashref(); + $jqtotal++; + $cachekey =3D '%'.$cachekey; + my $cached =3D $jr->{$cachekey}; + if (!$cached) { + $jqcachemisses++; + $q->execute($jr->{flight}, $jr->{job}); + $cached =3D $q->fetchrow_hashref(); + $jr->{$cachekey} =3D $cached; + } + return $cached; } =20 our %hosts; @@ -215,6 +225,12 @@ END my $inrows =3D $hosts{$hostname}; print DEBUG "FOUND ", (scalar @$inrows), " ROWS for $hostname\n"; =20 + # Each entry in @$inrows is a $jr, which is a hash + # It has keys for the result columns in mainquery + # It also has keys '%' (yes, with a literal '%') + # which are the results of per-job queries. + # The contents of $jr for each job is cached across runs. (TODO) + my @rows; foreach my $jr (@$inrows) { print DEBUG "JOB $jr->{flight}.$jr->{job} "; @@ -377,3 +393,5 @@ foreach my $host (sort keys %hosts) { reporthost $host; }); } + +print DEBUG "JQ CACHE ".($jqtotal-$jqcachemisses)." / $jqtotal\n"; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel