3
3
# #
4
4
# # This source file is part of the SwiftAWSLambdaRuntime open source project
5
5
# #
6
- # # Copyright (c) 2017-2018 Apple Inc. and the SwiftAWSLambdaRuntime project authors
6
+ # # Copyright (c) 2017-2022 Apple Inc. and the SwiftAWSLambdaRuntime project authors
7
7
# # Licensed under Apache License v2.0
8
8
# #
9
9
# # See LICENSE.txt for license information
@@ -27,6 +27,8 @@ if [[ $(uname -s) == "Linux" ]]; then
27
27
fi
28
28
29
29
swift build -c release -Xswiftc -g
30
+ swift build --package-path Examples/Echo -c release -Xswiftc -g
31
+ swift build --package-path Examples/JSON -c release -Xswiftc -g
30
32
31
33
cleanup () {
32
34
kill -9 $server_pid
@@ -58,7 +60,7 @@ cold=()
58
60
export MAX_REQUESTS=1
59
61
for (( i= 0 ; i< $cold_iterations ; i++ )) ; do
60
62
start=$( gdate +%s%N)
61
- ./.build/release/StringSample
63
+ ./Examples/Echo/ .build/release/MyLambda
62
64
end=$( gdate +%s%N)
63
65
cold+=( $(( $end - $start )) )
64
66
done
@@ -70,7 +72,7 @@ results+=( "$MODE, cold: $avg_cold (ns)" )
70
72
echo " running $MODE mode warm test"
71
73
export MAX_REQUESTS=$warm_iterations
72
74
start=$( gdate +%s%N)
73
- ./.build/release/StringSample
75
+ ./Examples/Echo/ .build/release/MyLambda
74
76
end=$( gdate +%s%N)
75
77
sum_warm=$(( $end - $start - $avg_cold )) # substract by avg cold since the first call is cold
76
78
avg_warm=$(( $sum_warm / ($warm_iterations - 1 )) ) # substract since the first call is cold
@@ -96,7 +98,7 @@ cold=()
96
98
export MAX_REQUESTS=1
97
99
for (( i= 0 ; i< $cold_iterations ; i++ )) ; do
98
100
start=$( gdate +%s%N)
99
- ./.build/release/CodableSample
101
+ ./Examples/JSON/ .build/release/MyLambda
100
102
end=$( gdate +%s%N)
101
103
cold+=( $(( $end - $start )) )
102
104
done
@@ -108,7 +110,7 @@ results+=( "$MODE, cold: $avg_cold (ns)" )
108
110
echo " running $MODE mode warm test"
109
111
export MAX_REQUESTS=$warm_iterations
110
112
start=$( gdate +%s%N)
111
- ./.build/release/CodableSample
113
+ ./Examples/JSON/ .build/release/MyLambda
112
114
end=$( gdate +%s%N)
113
115
sum_warm=$(( $end - $start - $avg_cold )) # substract by avg cold since the first call is cold
114
116
avg_warm=$(( $sum_warm / ($warm_iterations - 1 )) ) # substract since the first call is cold
0 commit comments