case3_measure.sh
text/x-sh
Filename: case3_measure.sh
Type: text/x-sh
Part: 4
#!/bin/bash
##################
### Definition ###
##################
port_primary=5533
port_standby=5534
## Used source
SOURCE=hsfOFF_ad1hr
## Number of runs
NUMRUN=5
## Measurement duration
DURATION=120
## Number of clients during a run
NUMCLIENTS=30
###########################
### measure performance ###
###########################
for i in `seq ${NUMRUN}`
do
# Prepare clean enviroment for each measurements
./v2_setup_n.sh
echo "=================="
echo "${SOURCE}_${i}.dat"
echo "=================="
# Do actual measurements
./pgbench -p $port_primary -U postgres postgres -c $NUMCLIENTS -j $NUMCLIENTS -T $DURATION > primary_${SOURCE}_${i}.dat &
./pgbench -p $port_standby -U postgres postgres -c $NUMCLIENTS -j $NUMCLIENTS -T $DURATION -b select-only --no-vacuum > standby_${SOURCE}_${i}.dat
done