chore: Apply shfmt to shell scripts

main
Sean McBride 4 years ago
parent 66482d012c
commit de5ee9af53

@ -69,5 +69,7 @@
"C_Cpp.files.exclude": { "C_Cpp.files.exclude": {
"awsm/wasmception": true, "awsm/wasmception": true,
"**/.vscode": true "**/.vscode": true
} },
"shellformat.flag": "-ln=bash -i 0 -bn -ci -sr -kp"
} }

@ -44,15 +44,15 @@ help() {
dry_run() { dry_run() {
find runtime \ find runtime \
\( -path "runtime/thirdparty" -o -path "runtime/tests/gocr" -o -path "runtime/tests/TinyEKF" -o -path "runtime/tests/CMSIS_5_NN" -o -path "runtime/tests/sod" -o -path "runtime/tests/**/thirdparty" \) -prune -false -o \ \( -path "runtime/thirdparty" -o -path "runtime/tests/gocr" -o -path "runtime/tests/TinyEKF" -o -path "runtime/tests/CMSIS_5_NN" -o -path "runtime/tests/sod" -o -path "runtime/tests/**/thirdparty" \) -prune -false -o \
-type f \( -iname \*.h -o -iname \*.c -o -iname \*.s \) -print | -type f \( -iname \*.h -o -iname \*.c -o -iname \*.s \) -print \
xargs clang-format -Werror -n -ferror-limit=0 | xargs clang-format -Werror -n -ferror-limit=0
} }
format() { format() {
find runtime \ find runtime \
\( -path "runtime/thirdparty" -o -path "runtime/tests/gocr" -o -path "runtime/tests/TinyEKF" -o -path "runtime/tests/CMSIS_5_NN" -o -path "runtime/tests/sod" -o -path "runtime/tests/**/thirdparty" \) -prune -false -o \ \( -path "runtime/thirdparty" -o -path "runtime/tests/gocr" -o -path "runtime/tests/TinyEKF" -o -path "runtime/tests/CMSIS_5_NN" -o -path "runtime/tests/sod" -o -path "runtime/tests/**/thirdparty" \) -prune -false -o \
-type f \( -iname \*.h -o -iname \*.c -o -iname \*.s \) -print | -type f \( -iname \*.h -o -iname \*.c -o -iname \*.s \) -print \
xargs clang-format -i | xargs clang-format -i
} }
case $1 in case $1 in

@ -66,8 +66,8 @@ for payload in ${payloads[*]}; do
' < "$results_directory/$file.csv" >> "$results_directory/success.csv" ' < "$results_directory/$file.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$file.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$file.csv" \
sort -g >"$results_directory/$file-response.csv" | sort -g > "$results_directory/$file-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$file-response.csv") oks=$(wc -l < "$results_directory/$file-response.csv")

@ -62,8 +62,8 @@ for conn in ${concurrency[*]}; do
' < "$results_directory/con$conn.csv" >> "$results_directory/success.csv" ' < "$results_directory/con$conn.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/con$conn.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/con$conn.csv" \
sort -g >"$results_directory/con$conn-response.csv" | sort -g > "$results_directory/con$conn-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/con$conn-response.csv") oks=$(wc -l < "$results_directory/con$conn-response.csv")

@ -62,8 +62,8 @@ for ((i = 1; i < 2; i++)); do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -65,8 +65,8 @@ for ((i = 0; i < 2; i++)); do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -63,8 +63,8 @@ for ((i = 0; i < 1; i++)); do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -32,8 +32,8 @@ for ((i = 0; i < 2; i++)); do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -66,8 +66,8 @@ for ((i = 0; i < 2; i++)); do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -78,8 +78,8 @@ for scheduler in ${schedulers[*]}; do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -78,8 +78,8 @@ for scheduler in ${schedulers[*]}; do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -78,8 +78,8 @@ for payload in ${payloads[*]}; do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -66,8 +66,8 @@ for payload in ${payloads[*]}; do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -32,8 +32,8 @@ for payload in ${payloads[*]}; do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -78,8 +78,8 @@ for scheduler in ${schedulers[*]}; do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -78,8 +78,8 @@ for scheduler in ${schedulers[*]}; do
' < "$results_directory/$payload.csv" >> "$results_directory/success.csv" ' < "$results_directory/$payload.csv" >> "$results_directory/success.csv"
# Filter on 200s, convery from s to ms, and sort # Filter on 200s, convery from s to ms, and sort
awk -F, '$7 == 200 {print ($1 * 1000)}' <"$results_directory/$payload.csv" | awk -F, '$7 == 200 {print ($1 * 1000)}' < "$results_directory/$payload.csv" \
sort -g >"$results_directory/$payload-response.csv" | sort -g > "$results_directory/$payload-response.csv"
# Get Number of 200s # Get Number of 200s
oks=$(wc -l < "$results_directory/$payload-response.csv") oks=$(wc -l < "$results_directory/$payload-response.csv")

@ -5,8 +5,7 @@ ITERS=$3
# before running this benchmark, # before running this benchmark,
# copy fibonacci to fibonacci_native.out # copy fibonacci to fibonacci_native.out
testeach() testeach() {
{
tmp_cnt=${ITERS} tmp_cnt=${ITERS}
exe_relpath=$1 exe_relpath=$1

Loading…
Cancel
Save