blob: 1b9df97d3c51272270510c16a362249b8597f47f [file] [log] [blame]
Yulia Portnovab0c977c2015-12-11 19:23:28 +02001#!/bin/bash
2
3set -e
4
5
6while [[ $# > 1 ]]
7do
8key="$1"
9
10case $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 ;;
23esac
24shift
25done
26
27OMGPATN=/tmp
28
29cd "$OMGPATN"
30source venv/bin/activate
31
32cd omgbenchmark/rally_plugin
33
Yulia Portnova674dba12015-12-14 10:20:51 +020034sed -i -e "s,rabbit:\/\/guest:guest@localhost\/,$URL,g" deployment.json
35sed -i -e "s,times\": 100,times\": $TIMES,g" task.json
Yulia Portnovab0c977c2015-12-11 19:23:28 +020036
Yulia Portnova674dba12015-12-14 10:20:51 +020037rally --plugin-paths . deployment create --file=deployment.json --name=test2 &> /dev/null
Yulia Portnovab0c977c2015-12-11 19:23:28 +020038rally --plugin-paths . task start task.json &> ~/omg.log
Yulia Portnova2b63d582015-12-14 15:16:52 +020039
40cat ~/omg.log | grep "total" | grep -o '[0-9,.]\+%' | grep -o '[0-9,.]\+'
41cat ~/omg.log | grep "Load duration" | grep -o '[0-9,.]\+'