From 990b2bbd3666a5b16189aad9a15f5967eedfe522 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Mon, 13 Mar 2017 12:26:21 -0400 Subject: [PATCH] jjb: Add timestamp and lttng-ci commit ID to benchmark metadata Signed-off-by: Francis Deslauriers --- .../lttng-baremetal-tests/run-baremetal-benchmarks.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/lttng-baremetal-tests/run-baremetal-benchmarks.sh b/scripts/lttng-baremetal-tests/run-baremetal-benchmarks.sh index ecc164c..b5c633c 100644 --- a/scripts/lttng-baremetal-tests/run-baremetal-benchmarks.sh +++ b/scripts/lttng-baremetal-tests/run-baremetal-benchmarks.sh @@ -31,9 +31,12 @@ python3 -u "$LTTNG_CI_PATH"/scripts/lttng-baremetal-tests/lava-submit.py \ RESULT_STORAGE_FOLDER="$BASE_STORAGE_FOLDER/benchmark-results/$JOB_NAME/$BUILD_NUMBER" $SSH_COMMAND "$STORAGE_USER@$STORAGE_HOST" mkdir -p "$RESULT_STORAGE_FOLDER" -# Create a metadata file for this job containing the build_id and the commit ids -echo "build_id,kernel_commit,modules_commit,tools_commit" > metadata.csv -echo "$BUILD_NUMBER,$KERNEL_COMMIT_ID,$LTTNG_MODULES_COMMIT_ID,$LTTNG_TOOLS_COMMIT_ID" >> metadata.csv +# Create a metadata file for this job containing the build_id, timestamp and the commit ids +TIMESTAMP=$(/bin/date --iso-8601=seconds) +LTTNG_CI_COMMIT_ID="$(git --git-dir="$LTTNG_CI_PATH"/.git/ --work-tree="$LTTNG_CI_PATH" rev-parse --short HEAD)" + +echo "build_id,timestamp,kernel_commit,modules_commit,tools_commit,ci_commit" > metadata.csv +echo "$BUILD_NUMBER,$TIMESTAMP,$KERNEL_COMMIT_ID,$LTTNG_MODULES_COMMIT_ID,$LTTNG_TOOLS_COMMIT_ID,$LTTNG_CI_COMMIT_ID" >> metadata.csv # Copy the result files for each benchmark and metadata on storage server $SCP_COMMAND ./processed_results_close.csv "$STORAGE_USER@$STORAGE_HOST:$RESULT_STORAGE_FOLDER/close.csv" -- 2.34.1