From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 538F35A0082 for ; Tue, 1 Nov 2022 01:59:34 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4N1WrK5ccpz4xG6; Tue, 1 Nov 2022 11:59:29 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1667264369; bh=cixYejTvH3vng3ZRhME3xQet6SPeupeU+uAetnAfPmY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I3L0PyGZCmO69q6OC/FzorAEAETifxElR/Gx+dISth9cWAuQ8NOTAt2dL3zs88MqJ okMH0uDSWZ+GEs3XhTAdojqXYyMj3Q2PAY+T4MfgV8D1YL3ULBDc+bAH9Sz7mMlAiT gE9IDCXRxNQqKQnQb3zvPKevO4yuPsowUvnLa5g0= Date: Tue, 1 Nov 2022 11:41:41 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v2 3/5] test/lib/perf_report: Use own flag to track initialisation Message-ID: References: <20221031112059.170269-1-sbrivio@redhat.com> <20221031112059.170269-4-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LjCc4UCiOjybb86Z" Content-Disposition: inline In-Reply-To: <20221031112059.170269-4-sbrivio@redhat.com> Message-ID-Hash: MEA6OZU4Q2TUMLGKQ6VOLPQPAGTWHG25 X-Message-ID-Hash: MEA6OZU4Q2TUMLGKQ6VOLPQPAGTWHG25 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: <> Archived-At: List-Archive: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --LjCc4UCiOjybb86Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 31, 2022 at 12:20:57PM +0100, Stefano Brivio wrote: > Instead of just disabling performance reports if running in demo > mode. This allows us to use table functions outside of performance > reports. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > test/lib/perf_report | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >=20 > diff --git a/test/lib/perf_report b/test/lib/perf_report > index ed71ef9..4ffb14b 100755 > --- a/test/lib/perf_report > +++ b/test/lib/perf_report > @@ -13,6 +13,7 @@ > # Copyright (c) 2021 Red Hat GmbH > # Author: Stefano Brivio > =20 > +PERF_INIT=3D0 > PERF_LINK_COUNT=3D0 > PERF_JS=3D"${LOGDIR}/web/perf.js" > =20 > @@ -129,6 +130,7 @@ perf_init() { > mkdir -p "$(dirname "${PERF_JS}")" > echo "${PERF_TEMPLATE_HTML}" > "${PERF_JS}" > perf_report_sub commit "$(echo ${COMMIT} | sed "s/'/\\\'/g")" > + PERF_INIT=3D1 > } > =20 > # perf_fill_lines() - Fill multiple "LINE" directives in template, match= ing rows > @@ -178,6 +180,7 @@ perf_fill_lines() { > =20 > # perf_finish() - Add trailing backslashes and process ending templates > perf_finish() { > + PERF_INIT=3D0 > perf_fill_lines > sed -i 's/^.*$/&\\/g' "${PERF_JS}" > echo "${PERF_TEMPLATE_JS}" >> "${PERF_JS}" > @@ -215,7 +218,7 @@ perf_report() { > =20 > # perf_th() - Table header for a set of tests > perf_th() { > - [ ${DEMO} -eq 1 ] && return > + [ ${PERF_INIT} -eq 0 ] && return > =20 > shift > =20 > @@ -231,7 +234,7 @@ perf_th() { > =20 > # perf_tr() - Main table row > perf_tr() { > - [ ${DEMO} -eq 1 ] && return > + [ ${PERF_INIT} -eq 0 ] && return > =20 > __line_no=3D0 > shift > @@ -244,7 +247,7 @@ perf_tr() { > =20 > # perf_td() - Single cell with test result > perf_td() { > - [ ${DEMO} -eq 1 ] && return > + [ ${PERF_INIT} -eq 0 ] && return > =20 > __rewind=3D"${1}" > shift --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --LjCc4UCiOjybb86Z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoULxWu4/Ws0dB+XtgypY4gEwYSIFAmNgaz8ACgkQgypY4gEw YSJCXxAAlYRY1682qUUHIXPcr5zuqZiwVj+4SeFGC7j11NlPKsBfRlUGQQ2fEmIn UON5zL9k6I0sy8ZRW+KNZTY/Gs+SMcjsbgDcttAcq0pBGOpE3VAVsFq3FplYi4kF knDL0W4vJIoGpkz93FoJ4XQcXcI2nS3ELcxdGyyC0p8vuK1zTw6zSkLTWFHarTX2 9K8SiR/Kvu5hRBmY7lHZPJuuQvaeZDoRkJGzD2iildyYzqDAF8WHgHdxQ2kOlpuG LK8CxoI02nu1i2KMDq18CVf+s+JpqwPcEDZh/BiPETIJNh7RIs6w8J/f1XQ04elb DdFS8IMfCUL2WGf55qmrnbNyqLUSb2+Z6vQeEsacKWmckX9EKdzZiKon6CRmS2XJ Q1+w9FewTJtvn6OYRM4vQraNm6oAUVM83bLSD74YbRR/hLtE1FJ/V1awWD3OL/9O WGoD+qIh3CjfSxkLb5BRtvDFdMQLbbEIctJsdx7UCMB8jdh49ehMdgIo2IqlNPyu X3ohOixL9R58HEYg56rogwzHIHF8RpdCQy8Qtxtrn95dUYysEvc2MbqArjxfK29d Mkwzt/bvc7PbA959pBHf6TjLbjBOPsHDot0SAPwJU66jBXiDd2KI/L1Ydx2DZdSF uotXVGmkH9wZpn0ZG4KgOGdnyUoDQMhY91NqCeOTRTl/lSjHhLA= =nTyJ -----END PGP SIGNATURE----- --LjCc4UCiOjybb86Z--