rename bw_mean to bw, other fixes
diff --git a/tests/disk_test_agent.py b/tests/disk_test_agent.py
index b129175..e0af6e7 100644
--- a/tests/disk_test_agent.py
+++ b/tests/disk_test_agent.py
@@ -16,23 +16,41 @@
 SETTING = 1
 
 
+def get_test_sync_mode(jconfig):
+    try:
+        return jconfig['sync_mode']
+    except KeyError:
+        pass
+
+    is_sync = jconfig.get("sync", "0") == "1"
+    is_direct = jconfig.get("direct", "0") == "1"
+
+    if is_sync and is_direct:
+        return 'x'
+    elif is_sync:
+        return 's'
+    elif is_direct:
+        return 'd'
+    else:
+        return 'a'
+
+
 def get_test_summary(params):
     rw = {"randread": "rr",
           "randwrite": "rw",
           "read": "sr",
           "write": "sw"}[params["rw"]]
 
-    if params.get("direct") == '1':
-        sync_mode = 'd'
-    elif params.get("sync") == '1':
-        sync_mode = 's'
-    else:
-        sync_mode = 'a'
+    sync_mode = get_test_sync_mode(params)
+    th_count = params.get('numjobs')
+    if th_count is None:
+        th_count = params.get('concurence', '1')
+    th_count = int(th_count)
 
-    th_count = int(params.get('numjobs', '1'))
-
-    return "{0}{1}{2}th{3}".format(rw, sync_mode,
-                                   params['blocksize'], th_count)
+    return "{0}{1}{2}th{3}".format(rw,
+                                   sync_mode,
+                                   params['blocksize'],
+                                   th_count)
 
 
 counter = [0]
@@ -384,20 +402,6 @@
         yield bconf
 
 
-def get_test_sync_mode(jconfig):
-        is_sync = jconfig.get("sync", "0") == "1"
-        is_direct = jconfig.get("direct_io", "0") == "1"
-
-        if is_sync and is_direct:
-            return 'sd'
-        elif is_sync:
-            return 's'
-        elif is_direct:
-            return 'd'
-        else:
-            return 'a'
-
-
 def add_job_results(jname, job_output, jconfig, res):
     if job_output['write']['iops'] != 0:
         raw_result = job_output['write']
@@ -406,7 +410,7 @@
 
     if jname not in res:
         j_res = {}
-        j_res["action"] = jconfig["rw"]
+        j_res["rw"] = jconfig["rw"]
         j_res["sync_mode"] = get_test_sync_mode(jconfig)
         j_res["concurence"] = int(jconfig.get("numjobs", 1))
         j_res["blocksize"] = jconfig["blocksize"]
@@ -415,7 +419,8 @@
                             int(jconfig.get("ramp_time", 0))]
     else:
         j_res = res[jname]
-        assert j_res["action"] == jconfig["rw"]
+        assert j_res["rw"] == jconfig["rw"]
+        assert j_res["rw"] == jconfig["rw"]
         assert j_res["sync_mode"] == get_test_sync_mode(jconfig)
         assert j_res["concurence"] == int(jconfig.get("numjobs", 1))
         assert j_res["blocksize"] == jconfig["blocksize"]
@@ -428,9 +433,7 @@
     def j_app(name, x):
         j_res.setdefault(name, []).append(x)
 
-    # 'bw_dev bw_mean bw_max bw_min'.split()
-    # probably fix fio bug - iops is scaled to joncount, but bw - isn't
-    j_app("bw_mean", raw_result["bw_mean"] * j_res["concurence"])
+    j_app("bw", raw_result["bw"])
     j_app("iops", raw_result["iops"])
     j_app("lat", raw_result["lat"]["mean"])
     j_app("clat", raw_result["clat"]["mean"])