Skip to content

Commit f72006c

Browse files
committed
Process final query without trailing newline
1 parent 61ffd81 commit f72006c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/benchmark-common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ bench_concurrent_qps() {
348348

349349
# Read the same query file that bench_run_query consumed.
350350
local queries=() q
351-
while IFS= read -r q; do
351+
while IFS= read -r q || [ -n "$q" ]; do
352352
[ -z "$q" ] && continue
353353
queries+=("$q")
354354
done < "$BENCH_QUERIES_FILE"
@@ -476,7 +476,7 @@ bench_main() {
476476

477477
: > result.csv
478478
local query_num=1
479-
while IFS= read -r query; do
479+
while IFS= read -r query || [ -n "$query" ]; do
480480
# Skip empty lines.
481481
[ -z "$query" ] && continue
482482
bench_run_query "$query" "$query_num"

0 commit comments

Comments
 (0)