Skip to content

Commit 794f053

Browse files
committed
Update run.sh to print execution time
1 parent 2d021b6 commit 794f053

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

presto/run.sh

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ queryNum=1
66
cat queries.sql | while read query; do
77
for i in $(seq 1 $TRIES); do
88
echo "Running query $queryNum: $query"
9-
/opt/presto-cli --server 127.0.0.1:8080 --schema "clickbench_parquet" --session offset_clause_enabled=true --catalog "hive" --execute "${query}"
9+
/opt/presto-cli --server 127.0.0.1:8080 --user clickbench_runner --schema "clickbench_parquet" --session offset_clause_enabled=true --catalog "hive" --execute "${query}"
10+
execution_time=$(/opt/presto-cli --server 127.0.0.1:8080 --user clickbench_manager --execute "SELECT date_diff('millisecond',started,\"end\") FROM system.runtime.queries WHERE user='clickbench_runner' ORDER BY created DESC LIMIT 1" | tr -d '"') && echo "Execution time: ${execution_time}ms"
1011
done
1112
((queryNum++))
1213
done

0 commit comments

Comments
 (0)