Yulia Portnova | b0c977c | 2015-12-11 19:23:28 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | |
| 6 | while [[ $# > 1 ]] |
| 7 | do |
| 8 | key="$1" |
| 9 | |
| 10 | case $key in |
| 11 | url) |
| 12 | URL="$2" |
| 13 | shift |
| 14 | ;; |
| 15 | times) |
| 16 | TIMES="$2" |
| 17 | shift |
| 18 | ;; |
| 19 | *) |
| 20 | echo "Unknown option $key" |
| 21 | exit 1 |
| 22 | ;; |
| 23 | esac |
| 24 | shift |
| 25 | done |
| 26 | |
| 27 | OMGPATN=/tmp |
| 28 | |
| 29 | cd "$OMGPATN" |
| 30 | source venv/bin/activate |
| 31 | |
| 32 | cd omgbenchmark/rally_plugin |
| 33 | |
Yulia Portnova | 674dba1 | 2015-12-14 10:20:51 +0200 | [diff] [blame] | 34 | sed -i -e "s,rabbit:\/\/guest:guest@localhost\/,$URL,g" deployment.json |
| 35 | sed -i -e "s,times\": 100,times\": $TIMES,g" task.json |
Yulia Portnova | b0c977c | 2015-12-11 19:23:28 +0200 | [diff] [blame] | 36 | |
Yulia Portnova | 674dba1 | 2015-12-14 10:20:51 +0200 | [diff] [blame] | 37 | rally --plugin-paths . deployment create --file=deployment.json --name=test2 &> /dev/null |
Yulia Portnova | b0c977c | 2015-12-11 19:23:28 +0200 | [diff] [blame] | 38 | rally --plugin-paths . task start task.json &> ~/omg.log |
Yulia Portnova | 2b63d58 | 2015-12-14 15:16:52 +0200 | [diff] [blame^] | 39 | |
| 40 | cat ~/omg.log | grep "total" | grep -o '[0-9,.]\+%' | grep -o '[0-9,.]\+' |
| 41 | cat ~/omg.log | grep "Load duration" | grep -o '[0-9,.]\+' |