omg fixes
diff --git a/wally/suits/omgbench/__init__.py b/wally/suits/omgbench/__init__.py
index 10a3151..be5b550 100644
--- a/wally/suits/omgbench/__init__.py
+++ b/wally/suits/omgbench/__init__.py
@@ -14,15 +14,18 @@
@classmethod
def format_for_console(cls, data):
- results = []
-
+ success_vals = []
+ duration_vals = []
for res in data[0]:
- results.append(float(res.raw_result))
+ success, duration = res.raw_result.strip().split('\n')
+ success_vals.append(float(success))
+ duration_vals.append(float(duration))
- totalt = sum(results)
- totalms = int(100 * 2 * len(results) / totalt)
+ totalt = sum(duration_vals)
+ totalms = int(100 * 2 * len(duration_vals) / totalt)
+ sucesst = int(sum(success_vals) / len(success_vals))
tab = texttable.Texttable(max_width=120)
tab.set_deco(tab.HEADER | tab.VLINES | tab.BORDER)
- tab.header(["Bandwidth total"])
- tab.add_row([totalms])
+ tab.header(["Bandwidth m/s", "Success %"])
+ tab.add_row([totalms, sucesst])
return tab.draw()
diff --git a/wally/suits/omgbench/prepare.sh b/wally/suits/omgbench/prepare.sh
index ef07e36..b363a75 100755
--- a/wally/suits/omgbench/prepare.sh
+++ b/wally/suits/omgbench/prepare.sh
@@ -8,6 +8,8 @@
mkdir -p "$OMGPATN"
cd "$OMGPATN"
+apt-get install git
+
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 0aa2d9c..1b9df97 100755
--- a/wally/suits/omgbench/run.sh
+++ b/wally/suits/omgbench/run.sh
@@ -36,4 +36,6 @@
rally --plugin-paths . deployment create --file=deployment.json --name=test2 &> /dev/null
rally --plugin-paths . task start task.json &> ~/omg.log
-cat ~/omg.log | grep "Load duration" | grep -o '[0-9,.]\+'
\ No newline at end of file
+
+cat ~/omg.log | grep "total" | grep -o '[0-9,.]\+%' | grep -o '[0-9,.]\+'
+cat ~/omg.log | grep "Load duration" | grep -o '[0-9,.]\+'