-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathbench-publish.bash
More file actions
executable file
·96 lines (85 loc) · 2.91 KB
/
Copy pathbench-publish.bash
File metadata and controls
executable file
·96 lines (85 loc) · 2.91 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/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
# Clean-up old results
if [ "$SMOKE" = "" ]; then
rm -rf gh-pages
fi
NEXMARK_CSV_FILE='nexmark_results.csv'
NEXMARK_DRAM_CSV_FILE='dram_nexmark_results.csv'
NEXMARK_PERSISTENCE_CSV_FILE='persistence_nexmark_results.csv'
GALEN_CSV_FILE='galen_results.csv'
LDBC_CSV_FILE='ldbc_results.csv'
rm -f nexmark_comment.txt
# Clone repo
if [ ! -d "gh-pages" ]; then
git clone --depth 1 -b main git@github.com:feldera/benchmarks.git gh-pages
fi
pip3 install -r gh-pages/requirements.txt
# 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
# Add nexmark results to repo
DEPLOY_DIR="gh-pages/nexmark/${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 nexmark results
mkdir -p ${DEPLOY_DIR}
mv ${NEXMARK_CSV_FILE} ${NEXMARK_DRAM_CSV_FILE} ${DEPLOY_DIR}
gzip -f ${DEPLOY_DIR}/${NEXMARK_CSV_FILE}
#gzip -f ${DEPLOY_DIR}/${NEXMARK_PERSISTENCE_CSV_FILE}
gzip -f ${DEPLOY_DIR}/${NEXMARK_DRAM_CSV_FILE}
# Add galen results to repo
DEPLOY_DIR="gh-pages/galen/${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 galen results
mkdir -p ${DEPLOY_DIR}
mv ${GALEN_CSV_FILE} ${DEPLOY_DIR}
gzip -f ${DEPLOY_DIR}/${GALEN_CSV_FILE}
# Add ldbc results to repo
#DEPLOY_DIR="gh-pages/ldbc/${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 ldbc results
#mkdir -p ${DEPLOY_DIR}
#mv ${LDBC_CSV_FILE} ${DEPLOY_DIR}
#gzip -f ${DEPLOY_DIR}/${LDBC_CSV_FILE}
# Update CI history plots
python3 gh-pages/_scripts/ci_history.py --append --machine $CI_MACHINE_TYPE
# Push results to gh-pages repo
if [ "$SMOKE" = "" ]; then
cd gh-pages
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 ..
python3 gh-pages/_scripts/compare_nexmark.py > nexmark_comment.txt
rm -rf gh-pages
git clean -f
else
python3 gh-pages/_scripts/compare_nexmark.py > nexmark_comment.txt
fi