#!/usr/bin/env bash

MACHINE=$1
LABEL=$2
DBNAME=$3

for r in $(seq 1 100); do

	for m in simple prepared; do

		for c in 1 4 8 16 32; do

			pgbench -M $m -S -c $c -j $c -T 10 $DBNAME > pgbench.log 2>&1

			tps=$(grep tps pgbench.log | awk '{print $3}')

			echo $MACHINE $LABEL $r $m $c $tps

		done

	done

done;
