-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
106 lines (80 loc) · 2.45 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
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
export _JAVA_OPTIONS="-Xms8g -Xmx8g"
export targetHost="http://localhost:2021"
export usersPerSecond=200
export rpsRampUpDuration=30
export testDuration=600
#export targetRps=400
#export logsPerRequest=50
function post_test() {
aws s3 cp --recursive \
/home/ec2-user/gatling/build/reports/gatling \
s3://log-ingestion-performance-results > /dev/null
echo "Report name:"
ls /home/ec2-user/gatling/build/reports/gatling/
echo "================================="
echo "Starting Sleep"
sleep 300s
echo "Sleep over"
}
function run_target_rps_test() {
./gradlew \
clean \
gatlingRun-com.amazon.TargetRps \
-DusersPerSecond=$usersPerSecond \
-DtargetHost=$targetHost \
-DrpsRampUpDuration=$rpsRampUpDuration \
-DtestDuration=$testDuration \
-DtargetRps=$targetRps \
-DlogsPerRequest=$logsPerRequest
echo "================================="
echo "usersPerSecond=$usersPerSecond"
echo "targetHost=$targetHost"
echo "rpsRampUpDuration=$rpsRampUpDuration"
echo "testDuration=$testDuration"
echo "targetRps=$targetRps"
echo "logsPerRequest=$logsPerRequest"
echo "================================="
post_test
}
function run_basic_simulation_test() {
./gradlew \
clean \
gatlingRun-com.amazon.BasicSimulation \
-DtargetHost=$targetHost \
-DinitialLoad=$initialLoad \
-DpauseDuration=$pauseDuration \
-DpeakLoad=$peakLoad \
-DrampUpDuration=$rampUpDuration \
-DpeakLoadDuration=$peakLoadDuration \
-DlogsPerRequest=$logsPerRequest
echo "================================="
echo "targetHost = ${targetHost}"
echo "initialLoad = ${initialLoad}"
echo "pauseDuration = ${pauseDuration}"
echo "peakLoad = ${peakLoad}"
echo "rampUpDuration = ${rampUpDuration}"
echo "peakLoadDuration = ${peakLoadDuration}"
echo "logsPerRequest = ${logsPerRequest}"
echo "================================="
post_test
}
export targetRps=400
export logsPerRequest=50
run_target_rps_test
export targetRps=100
export logsPerRequest=200
run_target_rps_test
export targetRps=500
export logsPerRequest=50
run_target_rps_test
export targetRps=600
export logsPerRequest=50
run_target_rps_test
export initialLoad=20
export pauseDuration=0
export peakLoad=40
export rampUpDuration=180
export peakLoadDuration=600
export logsPerRequest=200
run_basic_simulation_test
echo "Done!"