omg fixes
diff --git a/configs-examples/omg.yaml b/configs-examples/omg.yaml
index 14e4207..e339984 100644
--- a/configs-examples/omg.yaml
+++ b/configs-examples/omg.yaml
@@ -4,11 +4,11 @@
omg: local
explicit_nodes:
- "ssh://root@192.168.60.101::/home/yportnova/.ssh/id_rsa.pub": testnode
- "ssh://root@192.168.59.3::/home/yportnova/.ssh/id_rsa.pub": testnode
+ "ssh://root@host::/root/.ssh/id_rsa.pub": testnode
+ "ssh://root@host2::/root/yportnova/.ssh/id_rsa.pub": testnode
tests:
- omg:
prerun_script: "wally/suits/omgbench/prepare.sh"
run_script: "wally/suits/omgbench/run.sh"
- run_opts: "times 23 url rabbit://guest:guest@192.168.60.101"
\ No newline at end of file
+ run_opts: "times 23 url rabbit://guest:guest@localhost"
\ No newline at end of file
diff --git a/wally/suits/omgbench/__init__.py b/wally/suits/omgbench/__init__.py
index be5b550..2e09c11 100644
--- a/wally/suits/omgbench/__init__.py
+++ b/wally/suits/omgbench/__init__.py
@@ -16,13 +16,15 @@
def format_for_console(cls, data):
success_vals = []
duration_vals = []
+ count = 0
for res in data[0]:
- success, duration = res.raw_result.strip().split('\n')
+ msgs, times, success, duration = res.raw_result.strip().split('\n')
+ count += int(msgs) * int(times)
success_vals.append(float(success))
duration_vals.append(float(duration))
totalt = sum(duration_vals)
- totalms = int(100 * 2 * len(duration_vals) / totalt)
+ totalms = int(count / totalt)
sucesst = int(sum(success_vals) / len(success_vals))
tab = texttable.Texttable(max_width=120)
tab.set_deco(tab.HEADER | tab.VLINES | tab.BORDER)
diff --git a/wally/suits/omgbench/prepare.sh b/wally/suits/omgbench/prepare.sh
index b363a75..8d0b742 100755
--- a/wally/suits/omgbench/prepare.sh
+++ b/wally/suits/omgbench/prepare.sh
@@ -8,7 +8,8 @@
mkdir -p "$OMGPATN"
cd "$OMGPATN"
-apt-get install git
+apt-get update
+apt-get -y install git python-pip
git clone https://github.com/openstack/rally
git clone https://github.com/Yulya/omgbenchmark
diff --git a/wally/suits/omgbench/run.sh b/wally/suits/omgbench/run.sh
index 1b9df97..c4d7a43 100755
--- a/wally/suits/omgbench/run.sh
+++ b/wally/suits/omgbench/run.sh
@@ -34,8 +34,10 @@
sed -i -e "s,rabbit:\/\/guest:guest@localhost\/,$URL,g" deployment.json
sed -i -e "s,times\": 100,times\": $TIMES,g" task.json
-rally --plugin-paths . deployment create --file=deployment.json --name=test2 &> /dev/null
+rally --plugin-paths . deployment create --file=deployment.json --name=test &> /dev/null
rally --plugin-paths . task start task.json &> ~/omg.log
+cat ~/omg.log | grep -m 1 "num_messages" | grep -o '[0-9,.]\+'
+cat ~/omg.log | grep -m 1 "times" | grep -o '[0-9,.]\+'
cat ~/omg.log | grep "total" | grep -o '[0-9,.]\+%' | grep -o '[0-9,.]\+'
cat ~/omg.log | grep "Load duration" | grep -o '[0-9,.]\+'