File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,15 +7,10 @@ cat queries.sql | while read -r query; do
77 echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null
88 docker restart $( docker ps -a -q)
99
10- retry_count=0
11- while [ $retry_count -lt 120 ]; do
12- if PGPASSWORD=test psql -h localhost -U postgres -c " SELECT 'Ok';" ; then
13- break
14- fi
15-
16- retry_count=$(( retry_count+ 1 ))
17- sleep 1
18- done
10+ # wait for the server quietly so retry-loop messages don't pollute log.txt
11+ # (the awk filter in benchmark.sh treats any `psql: error` line as a failed query)
12+ until pg_isready -h localhost --dbname postgres -U postgres > /dev/null 2>&1 ; do sleep 1; done
13+ until PGPASSWORD=test psql -h localhost -U postgres -c " SELECT 'Ok';" > /dev/null 2>&1 ; do sleep 1; done
1914
2015 echo " $query " ;
2116 for i in $( seq 1 $TRIES ) ; do
You can’t perform that action at this time.
0 commit comments