#!/bin/bash LOOPS=3 USES=1 BINROOT=/home/horiguti/bin DATADIR=/home/horiguti/data/data_catexp 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 3); do run "E_off" $BINROOT/pgsql_catexpe "-1" "-1" "-1" #run "E_on" $BINROOT/pgsql_catexpe "300s" "1s" "0" run "master" $BINROOT/pgsql_master_o2 "" "" "" done