-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy pathbench.bash
More file actions
132 lines (119 loc) · 4.92 KB
/
Copy pathbench.bash
File metadata and controls
132 lines (119 loc) · 4.92 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/bin/bash
#
# Usage (to test): $ SMOKE=true CI_MACHINE_TYPE='skylake-2x' bash scripts/bench.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 crates/nexmark/${NEXMARK_CSV_FILE} crates/dbsp/${GALEN_CSV_FILE} crates/dbsp/${LDBC_CSV_FILE} crates/nexmark/${NEXMARK_DRAM_CSV_FILE} crates/nexmark/${NEXMARK_PERSISTENCE_CSV_FILE}
rm -f nexmark_comment.txt
# Run nexmark benchmark
EVENT_RATE=10000000
MAX_EVENTS=100000000
GENERATORS=8
CORES=6
if [ "$SMOKE" != "" ]; then
EVENT_RATE=10000000
MAX_EVENTS=1000000
fi
cargo bench --bench nexmark -- --first-event-rate=${EVENT_RATE} --max-events=${MAX_EVENTS} --cpu-cores ${CORES} --num-event-generators ${GENERATORS} --source-buffer-size 10000 --input-batch-size 40000 --csv ${NEXMARK_CSV_FILE}
# Run galen benchmark
cargo bench --bench galen --features="with-csv" -- --workers 10 --csv ${GALEN_CSV_FILE}
# Run ldbc benchmarks
DATASET_SMALL='graph500-22'
DATASET_MEDIUM='datagen-8_4-fb'
if [ "$SMOKE" != "" ]; then
DATASET_SMALL='wiki-Talk'
DATASET_MEDIUM='kgs'
fi
cargo bench --bench ldbc-graphalytics --features="with-csv" -- bfs ${DATASET_SMALL} --threads 1 --csv ${LDBC_CSV_FILE}
cargo bench --bench ldbc-graphalytics --features="with-csv" -- bfs ${DATASET_MEDIUM} --threads 6 --csv ${LDBC_CSV_FILE}
cargo bench --bench ldbc-graphalytics --features="with-csv" -- pagerank ${DATASET_SMALL} --threads 1 --csv ${LDBC_CSV_FILE}
cargo bench --bench ldbc-graphalytics --features="with-csv" -- pagerank ${DATASET_MEDIUM} --threads 6 --csv ${LDBC_CSV_FILE}
# Run nexmark benchmark with persistence
EVENT_RATE=5000000
MAX_EVENTS=3000000
CORES=1
if [ "$SMOKE" != "" ]; then
EVENT_RATE=5000000
MAX_EVENTS=100000
fi
cargo bench --bench nexmark -- --first-event-rate=${EVENT_RATE} --max-events=${MAX_EVENTS} --cpu-cores ${CORES} --num-event-generators 6 --source-buffer-size 10000 --input-batch-size 40000 --csv ${NEXMARK_DRAM_CSV_FILE}
cargo bench --bench nexmark --features persistence -- --first-event-rate=${EVENT_RATE} --max-events=${MAX_EVENTS} --cpu-cores ${CORES} --num-event-generators 6 --source-buffer-size 10000 --input-batch-size 40000 --csv ${NEXMARK_PERSISTENCE_CSV_FILE}
# Clone repo
if [ ! -d "gh-pages" ]; then
git clone --depth 1 -b main git@github.com:gz/dbsp-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 crates/nexmark/${NEXMARK_CSV_FILE} crates/nexmark/${NEXMARK_PERSISTENCE_CSV_FILE} crates/nexmark/${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 crates/dbsp/${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 crates/dbsp/${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