From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: [PATCH v5 14/14] test: Move perf.js report file to $LOGDIR/web Date: Tue, 13 Sep 2022 14:35:29 +1000 Message-ID: <20220913043529.3079003-15-david@gibson.dropbear.id.au> In-Reply-To: <20220913043529.3079003-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1793883215661607954==" --===============1793883215661607954== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The tests generate a performance report in $BASEPATH/perf.js and hooks/pre-push copies it to the website. To avoid cluttering the working directory, instead put perf.js in $LOGDIR/web, since it's a test output artefact. Update hooks/pre-push to copy from its new location. Signed-off-by: David Gibson --- hooks/pre-push | 4 ++-- test/.gitignore | 1 - test/lib/perf_report | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/pre-push b/hooks/pre-push index 1c221e7..567a3e5 100755 --- a/hooks/pre-push +++ b/hooks/pre-push @@ -34,8 +34,8 @@ ssh "${USER_HOST}" "mkdir -p ${WEB} ${TEST} ${BIN}" cd test =20 ./ci -gzip -fk9 perf.js -scp perf.js perf.js.gz "${USER_HOST}:${WEB}/" +gzip -fk9 test_logs/web/perf.js +scp test_logs/web/perf.js test_logs/web/perf.js.gz "${USER_HOST}:${WEB}/" scp test_logs/* "${USER_HOST}:${TEST}/" ./run_demo =20 diff --git a/test/.gitignore b/test/.gitignore index 2e75cb5..e00b544 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,4 +1,3 @@ -perf.js test_logs/ mbuto/ *.img diff --git a/test/lib/perf_report b/test/lib/perf_report index b4fa685..8fd0588 100755 --- a/test/lib/perf_report +++ b/test/lib/perf_report @@ -14,7 +14,7 @@ # Author: Stefano Brivio =20 PERF_LINK_COUNT=3D0 -PERF_JS=3D"${BASEPATH}/perf.js" +PERF_JS=3D"${LOGDIR}/web/perf.js" =20 PERF_TEMPLATE_HTML=3D"document.write('"' Throughput in Gbps, latency in =C2=B5s. Threads are iperf3 processes, passt and pasta are cu= rrently single-threaded.
@@ -126,6 +126,7 @@ for (var i =3D 0; i < perf_links.length; i++) { =20 # perf_init() - Process first part of template perf_init() { + mkdir -p "$(dirname "${PERF_JS}")" echo "${PERF_TEMPLATE_HTML}" > "${PERF_JS}" perf_report_sub commit "$(echo ${COMMIT} | sed "s/'/\\\'/g")" } --=20 2.37.3 --===============1793883215661607954==--