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"])
diff --git a/tests/io_scenario_hdd.cfg b/tests/io_scenario_hdd.cfg
index 0c36324..46210b7 100644
--- a/tests/io_scenario_hdd.cfg
+++ b/tests/io_scenario_hdd.cfg
@@ -16,7 +16,7 @@
# check different thread count, sync mode. (latency, iops) = func(th_count)
# ---------------------------------------------------------------------
[hdd_test_{TEST_SUMM} * {NUM_ROUNDS}]
-blocksize={% 4k %}
+blocksize=4k
rw=randwrite
sync=1
numjobs={% 1, 5, 10, 15, 20, 30, 40, 80, 120 %}
@@ -26,7 +26,7 @@
# also check iops for randread
# ---------------------------------------------------------------------
[hdd_test_{TEST_SUMM} * {NUM_ROUNDS}]
-blocksize={% 4k %}
+blocksize=4k
rw=randread
direct=1
numjobs={% 1, 5, 10, 15, 20, 30, 40, 80, 120 %}
@@ -36,7 +36,7 @@
# also check BW for seq read/write.
# ---------------------------------------------------------------------
[hdd_test_{TEST_SUMM} * {NUM_ROUNDS}]
-blocksize={% 1m %}
+blocksize=1m
rw={% read, write %}
direct=1
numjobs={% 1, 5, 10, 15, 20, 30, 40, 80, 120 %}
@@ -48,4 +48,3 @@
blocksize=4k
rw=randwrite
direct=1
-
diff --git a/tests/io_scenario_long_test.cfg b/tests/io_scenario_long_test.cfg
index b1a40d9..4b0a79d 100644
--- a/tests/io_scenario_long_test.cfg
+++ b/tests/io_scenario_long_test.cfg
@@ -1,6 +1,8 @@
[defaults]
+
# 24h test
-NUM_ROUNDS=288
+NUM_ROUNDS1=270
+NUM_ROUNDS2=261
buffered=0
wait_for_previous
@@ -13,7 +15,13 @@
# ---------------------------------------------------------------------
# check read and write linearity. oper_time = func(size)
# ---------------------------------------------------------------------
-[24h_test * {NUM_ROUNDS}]
+[24h_test * {NUM_ROUNDS1}]
+blocksize=128k
+rw=randwrite
+direct=1
+runtime=30
+
+[24h_test * {NUM_ROUNDS2}]
blocksize=128k
rw=randwrite
direct=1
diff --git a/tests/itest.py b/tests/itest.py
index 3b71d3f..1dbbe13 100644
--- a/tests/itest.py
+++ b/tests/itest.py
@@ -177,7 +177,7 @@
merged_result = results[0]
merged_data = merged_result['res']
expected_keys = set(merged_data.keys())
- mergable_fields = ['bw_mean', 'clat', 'iops', 'lat', 'slat']
+ mergable_fields = ['bw', 'clat', 'iops', 'lat', 'slat']
for res in results[1:]:
assert res['__meta__'] == merged_result['__meta__']