-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·48 lines (42 loc) · 1.12 KB
/
run.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
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
while getopts ":e:i:s:" opt; do
case $opt in
e) ELASTICSEARCH_URL="$OPTARG"
;;
i) INDEX_NAME="$OPTARG"
;;
s) SERVER_UNDER_TEST_URL="$OPTARG"
;;
\?) echo "Invalid option -$OPTARG" >&2
;;
esac
done
# If the values are not set then set them to defaults
if [ -z $ELASTICSEARCH_URL ]
then
ELASTICSEARCH_URL="http://elasticsearch:9200"
fi
if [ -z $INDEX_NAME ]
then
INDEX_NAME="gatling-ldp-$(uuid)"
fi
if [ -z $SERVER_UNDER_TEST_URL ]
then
SERVER_UNDER_TEST_URL="http://trellis:8080"
fi
printf "Elasticsearch is %s\n" "$ELASTICSEARCH_URL"
printf "Index is %s\n" "$INDEX_NAME"
printf "Server under test is %s\n" "$SERVER_UNDER_TEST_URL"
docker run -e SIM_CLASS="ldp.StressTestIngest" \
-e SIM_USERS="20" \
-e SIM_RAMP="200" \
-e LDP_URL=$SERVER_UNDER_TEST_URL \
-e ELASTICSEARCH_URL=$ELASTICSEARCH_URL \
-e LOCAL_PATH_PREFIX="/srv/ciber" \
-v nfs-ciber:/srv/ciber \
-v $HOME/tmp/stress-results:/local/gatling/results \
-e INDEX_NAME=$INDEX_NAME \
--name gatling-performance-tests \
--net performance-net \
--rm \
gregjan/gatling-testbed-worker:0.5.0-SNAPSHOT