Yulia Portnova | b1a1507 | 2015-05-06 14:59:25 +0300 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -e |
| 3 | set -x |
| 4 | |
Yulia Portnova | 2b4af7b | 2015-05-07 15:49:33 +0300 | [diff] [blame^] | 5 | while [[ $# > 1 ]] |
| 6 | do |
| 7 | key="$1" |
| 8 | |
| 9 | case $key in |
| 10 | warehouses) |
| 11 | WAREHOUSES="$2" |
| 12 | shift |
| 13 | ;; |
| 14 | *) |
| 15 | echo "Unknown option $key" |
| 16 | exit 1 |
| 17 | ;; |
| 18 | esac |
| 19 | shift |
| 20 | done |
| 21 | |
Yulia Portnova | b1a1507 | 2015-05-06 14:59:25 +0300 | [diff] [blame] | 22 | DATABASE_PASSWORD=wally |
| 23 | DATBASE_USER=root |
| 24 | DB_NAME=tpcc |
| 25 | |
| 26 | cd ~/tpcc-mysql |
Yulia Portnova | 2b4af7b | 2015-05-07 15:49:33 +0300 | [diff] [blame^] | 27 | ./tpcc_start -h127.0.0.1 "-d$DB_NAME" "-u$DATBASE_USER" "-p$DATABASE_PASSWORD" -w"WAREHOUSES" -c16 -r10 -l1200 > ~/tpcc-output.log |
| 28 | echo "TpmC:" `cat ~/tpcc-output.log | grep TpmC | grep -o '[0-9,.]\+'` |