-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy pathbench-publish.bash
More file actions
executable file
·69 lines (59 loc) · 2.01 KB
/
bench-publish.bash
File metadata and controls
executable file
·69 lines (59 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
#
# Usage (to test): $ SMOKE=true CI_MACHINE_TYPE='skylake-2x' bash scripts/bench-publish.bash
# For CI env: Don't set `SMOKE`
#
set -ex
if [ -v ${CI_MACHINE_TYPE} ]; then
echo "Need to set CI_MACHINE_TYPE"
exit 1
fi
RESULTS_DIR=benchmark-run-data
NEXMARK_CSV_FILE='nexmark_results.csv'
NEXMARK_DRAM_CSV_FILE='dram_nexmark_results.csv'
NEXMARK_SQL_CSV_FILE='sql_nexmark_results.csv'
NEXMARK_SQL_METRICS_CSV_FILE='sql_nexmark_metrics.csv'
NEXMARK_SQL_STORAGE_CSV_FILE='sql_storage_nexmark_results.csv'
NEXMARK_SQL_STORAGE_METRICS_CSV_FILE='sql_storage_nexmark_metrics.csv'
NEXMARK_PERSISTENCE_CSV_FILE='persistence_nexmark_results.csv'
GALEN_CSV_FILE='galen_results.csv'
LDBC_CSV_FILE='ldbc_results.csv'
# If you change this, adjust the command also in the append_csv function in utils.py:
DATE_PREFIX=`date +"%Y-%m-%d-%H-%M/"`
if [ -z "${PR_COMMIT_SHA}" ]; then
# So we can run the script in non-runner environments and not pull request events
PR_COMMIT_SHA=`git rev-parse HEAD`
fi
BENCHMARKS_LIST='gh-pages/benchmarks-list'
> $BENCHMARKS_LIST
for test in ${RESULTS_DIR}/*; do
name=$(basename $test)
echo ${name} >> $BENCHMARKS_LIST
# Add results to repo
DEPLOY_DIR="gh-pages/${name}/${CI_MACHINE_TYPE}/${PR_COMMIT_SHA}/"
if [ -d "${DEPLOY_DIR}" ]; then
# If we already have results for this SHA (the directory exists),
# we will add the new results in a subdir
DEPLOY_DIR=${DEPLOY_DIR}${DATE_PREFIX}
fi
# Copy results
mkdir -p ${DEPLOY_DIR}
mv ${test}/* ${DEPLOY_DIR}
gzip -f ${DEPLOY_DIR}*.csv
done
# Update CI history plots
cd gh-pages
uv run --locked _scripts/ci_history.py --append --machine $CI_MACHINE_TYPE
# Push results to gh-pages repo
if [ "$SMOKE" = "" ]; then
if [ "$CI" = true ] ; then
git config user.email "no-reply@dbsp.systems"
git config user.name "dbsp-ci"
fi
git add .
git commit -a -m "Added benchmark results for $PR_COMMIT_SHA."
git push origin main
cd ..
rm -rf gh-pages
git clean -f
fi