#!/bin/bash LOOPS=20 ITERATION=10 BINROOT=/home/horiguti/bin DATADIR=/home/horiguti/data/data_catexpe PREC="numeric(10,2)" /usr/bin/killall postgres /usr/bin/sleep 3 run() { local BINARY=$1 local PGCTL=$2/bin/pg_ctl local PGSQL=$2/bin/postgres local PSQL=$2/bin/psql if [ "$3" != "" ]; then local SETTING1="set catalog_cache_prune_min_age to \"$3\";" local SETTING2="set catalog_cache_prune_min_age to \"$4\";" local SETTING3="set catalog_cache_prune_min_age to \"$5\";" fi # ($PGSQL -D $DATADIR 2>&1 > /dev/null)& ($PGSQL -D $DATADIR 2>&1 > /dev/null | /usr/bin/sed -e 's/^/# /')& /usr/bin/sleep 3 ${PSQL} postgres <&1 > /dev/null | /usr/bin/sed -e 's/^/# /' # oreport > $BINARY_perf.txt } for i in $(seq 0 ${ITERATION}); do run "master" $BINROOT/pgsql_master_o2 "" "" "" run "base" $BINROOT/pgsql_catexp-base "" "" "" run "ind" $BINROOT/pgsql_catexp-ind "" "" "" run "expire-off" $BINROOT/pgsql_catexpe "-1" "-1" "-1" run "expire-on" $BINROOT/pgsql_catexpe "300s" "1s" "0" done