From aa93f93ff0467a1c6a86bd13e4a26d685f0d2678 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Thu, 14 Oct 2021 09:26:22 -0700 Subject: [PATCH] Fixing the archiving of benchmark results (#7000) We were using the wrong directory name when trying to create a benchmark archive. It was looking for a single directory in the format benchmarks-apache-develop-main-benchmark-base-277-89433-base, but there are actually multiple directories in the format benchmarks-apache-develop-main-benchmark-base-277-89433-base-output-10-13-2021-18-26-22-apache-develop-main-benchmark-base-277-89433-base as well as a text file. Archiving the whole results directory. Also, including a tabular dump of the results in the archive for potentially easier parsing. --- ci/scripts/cleanup_benchmarks.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/ci/scripts/cleanup_benchmarks.sh b/ci/scripts/cleanup_benchmarks.sh index ae0dfec83f2d..bde59038b556 100755 --- a/ci/scripts/cleanup_benchmarks.sh +++ b/ci/scripts/cleanup_benchmarks.sh @@ -37,11 +37,9 @@ popd source concourse-metadata-resource/concourse_metadata CLUSTER_TAG="${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}-${BUILD_ID}${TAG_POSTFIX}" -RESULTS_BASE_DIR=$(pwd)/results -BENCHMARKS_DIR=benchmarks-${CLUSTER_TAG} -RESULTS_DIR=${RESULTS_BASE_DIR}/benchmarks-${CLUSTER_TAG} -BENCHMARKS_ARCHIVE_FILENAME=${BENCHMARKS_DIR}.tgz -BENCHMARKS_ARCHIVE_FILE=${RESULTS_BASE_DIR}/${BENCHMARKS_ARCHIVE_FILENAME} +BENCHMARKS_PREFIX=benchmarks-${CLUSTER_TAG} +BENCHMARKS_ARCHIVE_FILENAME=${BENCHMARKS_PREFIX}.tgz +BENCHMARKS_ARCHIVE_FILE=${RESULTS_DIR}/${BENCHMARKS_ARCHIVE_FILENAME} BENCHMARKS_ARTIFACTS_DESTINATION="${ARTIFACT_BUCKET}/benchmarks/${BUILD_PIPELINE_NAME}/${GEODE_SHA}" if [[ "${ARTIFACT_BUCKET}" =~ \. ]]; then @@ -54,10 +52,13 @@ pushd geode-benchmarks/infrastructure/scripts/aws/ ./destroy_cluster.sh -t ${CLUSTER_TAG} --ci popd -pushd ${RESULTS_BASE_DIR} - if [[ -d ${BENCHMARKS_DIR} ]]; then +pushd geode-benchmarks + ./infrastructure/scripts/aws/dump_results.sh ${RESULTS_DIR}/benchmarks-*/* | tee ${RESULTS_DIR}/results.txt +popd + +pushd ${RESULTS_DIR} echo "***** Creating benchmarks archive" - tar zcf ${BENCHMARKS_ARCHIVE_FILE} ${BENCHMARKS_DIR} + tar zcf ${BENCHMARKS_ARCHIVE_FILE} * echo "***** Copying benchmarks archive to storage" gsutil cp ${BENCHMARKS_ARCHIVE_FILE} gs://${BENCHMARKS_ARTIFACTS_DESTINATION}/${BENCHMARKS_ARCHIVE_FILENAME} printf "\n" @@ -69,9 +70,4 @@ pushd ${RESULTS_BASE_DIR} printf "\033[92m${ARTIFACT_SCHEME}://${BENCHMARKS_ARTIFACTS_DESTINATION}/${BENCHMARKS_ARCHIVE_FILENAME}\033[0m\n" printf "\033[92m=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\033[0m\n" printf "\n" - else - echo "***************************" - echo "No benchmark results found!" - echo "***************************" - fi popd