-
Notifications
You must be signed in to change notification settings - Fork 74
/
run_compare.sh
executable file
·36 lines (31 loc) · 1.31 KB
/
run_compare.sh
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
#!/usr/bin/env bash
datasource="elasticsearch"
_es=${ES_SERVER:-https://search-perfscale-dev-chmf5l4sh66lvxbnadi4bznl3a.us-west-2.es.amazonaws.com:443}
_es_baseline=${ES_SERVER_BASELINE:-https://search-perfscale-dev-chmf5l4sh66lvxbnadi4bznl3a.us-west-2.es.amazonaws.com:443}
tool=${1}
python3 -m venv ./venv
source ./venv/bin/activate
set -x
git clone https://github.com/cloud-bulldozer/benchmark-comparison
ln -s benchmark-comparison/config config
ln -s benchmark-comparison/tolerancy-configs tolerancy-configs
set +x
pip3 install benchmark-comparison/.
if [[ $? -ne 0 ]] ; then
echo "Unable to execute compare - Failed to install touchstone"
exit 1
fi
set -x
if [[ ${COMPARE_WITH_GOLD} == "true" ]]; then
echo "Comparing with gold"
touchstone_compare --database elasticsearch -url $_es $_es_baseline -u ${2} ${3} -o yaml --config config/${tool}.json --tolerancy-rules tolerancy-configs/${tool}.yaml | grep -v "ERROR"| tee compare_output_${!#}.yaml
else
touchstone_compare --database elasticsearch -url $_es -u ${2} -o yaml --config config/${tool}.json --tolerancy-rules tolerancy-configs/${tool}.yaml | grep -v "ERROR"| tee compare_output_${!#}.yaml
fi
set +x
if [[ $? -ne 0 ]] ; then
echo "Unable to execute compare - Failed to run touchstone"
exit 1
fi
deactivate
rm -rf venv benchmark-comparison config tolerancy-configs