Skip to content

Commit 59bb4e3

Browse files
committed
fix errors
1 parent 8a7da75 commit 59bb4e3

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/03-04-03-console-output.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# shellcheck disable=all
2+
13
2023-04-14T11:42:21+0200 info LocalLambdaServer : [AWSLambdaRuntimeCore] LocalLambdaServer started and listening on 127.0.0.1:7000, receiving events on /invoke
24
2023-04-14T11:42:21+0200 info Lambda : [AWSLambdaRuntimeCore] lambda runtime starting with LambdaConfiguration
35
General(logLevel: info))

Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/03-04-04-curl.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# shellcheck disable=all
2+
13
curl --header "Content-Type: application/json" \
24
--request POST \
35
--data '{"number": 3}' \

Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/03-04-05-curl.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# shellcheck disable=all
2+
13
curl --header "Content-Type: application/json" \
24
--request POST \
35
--data '{"number": 3}' \
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export LOCAL_LAMBDA_SERVER_ENABLED=true
1+
# shellcheck disable=all
22

3+
export LOCAL_LAMBDA_SERVER_ENABLED=true

scripts/linux_performance_setup.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ apt-get install -y vim htop strace linux-tools-common linux-tools-generic libc6-
2020

2121
echo 0 > /proc/sys/kernel/kptr_restrict
2222

23-
pushd /usr/bin
23+
pushd /usr/bin || exit -1
2424
rm -rf perf
2525
ln -s /usr/lib/linux-tools/*/perf perf
26-
popd
26+
popd || exit -1
2727

28-
pushd /opt
28+
pushd /opt || exit -1
2929
git clone https://github.com/brendangregg/FlameGraph.git
30-
popd
30+
popd || exit -1
3131

3232
# build the code in relase mode with debug symbols
3333
# swift build -c release -Xswiftc -g

scripts/performance_test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ kill -0 $server_pid # check server is alive # ignore-unacceptable-language
9696
echo "running $MODE mode cold test"
9797
cold=()
9898
export MAX_REQUESTS=1
99-
for (( i=0; i<$cold_iterations; i++ )); do
99+
for (( i=0; i<cold_iterations; i++ )); do
100100
start=$(gdate +%s%N)
101101
./Examples/HelloJSON/.build/release/MyLambda
102102
end=$(gdate +%s%N)
103103
cold+=( $((end-start)) )
104104
done
105105
sum_cold=$(IFS=+; echo "$((${cold[*]}))")
106-
avg_cold=$((sum_cold$cold_iterations))
106+
avg_cold=$((sum_cold/cold_iterations))
107107
results+=( "$MODE, cold: $avg_cold (ns)" )
108108

109109
# normal calls
@@ -112,7 +112,7 @@ export MAX_REQUESTS=$warm_iterations
112112
start=$(gdate +%s%N)
113113
./Examples/HelloJSON/.build/release/MyLambda
114114
end=$(gdate +%s%N)
115-
sum_warm=$((end-$start-avg_cold)) # substract by avg cold since the first call is cold
115+
sum_warm=$((end-start-avg_cold)) # substract by avg cold since the first call is cold
116116
avg_warm=$((sum_warm/(warm_iterations-1))) # substract since the first call is cold
117117
results+=( "$MODE, warm: $avg_warm (ns)" )
118118

0 commit comments

Comments
 (0)