a lot of fixes
diff --git a/wally/suits/io/results_loader.py b/wally/suits/io/results_loader.py
index c67dbe8..3b50bf7 100644
--- a/wally/suits/io/results_loader.py
+++ b/wally/suits/io/results_loader.py
@@ -3,7 +3,7 @@
import collections
-from wally.utils import ssize_to_b
+# from wally.utils import ssize_to_b
from wally.statistic import med_dev
PerfInfo = collections.namedtuple('PerfInfo',
@@ -12,16 +12,28 @@
'lat', 'lat_dev', 'raw'))
+def split_and_add(data, block_count):
+ assert len(data) % block_count == 0
+ res = [0] * (len(data) // block_count)
+
+ for i in range(block_count):
+ for idx, val in enumerate(data[i::block_count]):
+ res[idx] += val
+
+ return res
+
+
def process_disk_info(test_output):
data = {}
-
for tp, pre_result in test_output:
if tp != 'io' or pre_result is None:
pass
+ vm_count = pre_result['__test_meta__']['testnodes_count']
+
for name, results in pre_result['res'].items():
- bw, bw_dev = med_dev(results['bw'])
- iops, iops_dev = med_dev(results['iops'])
+ bw, bw_dev = med_dev(split_and_add(results['bw'], vm_count))
+ iops, iops_dev = med_dev(split_and_add(results['iops'], vm_count))
lat, lat_dev = med_dev(results['lat'])
dev = bw_dev / float(bw)
data[name] = PerfInfo(name, bw, iops, dev, lat, lat_dev, results)
@@ -82,19 +94,19 @@
return closure
-def load_data(raw_data):
- data = list(parse_output(raw_data))[0]
+# def load_data(raw_data):
+# data = list(parse_output(raw_data))[0]
- for key, val in data['res'].items():
- val['blocksize_b'] = ssize_to_b(val['blocksize'])
+# for key, val in data['res'].items():
+# val['blocksize_b'] = ssize_to_b(val['blocksize'])
- val['iops_mediana'], val['iops_stddev'] = med_dev(val['iops'])
- val['bw_mediana'], val['bw_stddev'] = med_dev(val['bw'])
- val['lat_mediana'], val['lat_stddev'] = med_dev(val['lat'])
- yield val
+# val['iops_mediana'], val['iops_stddev'] = med_dev(val['iops'])
+# val['bw_mediana'], val['bw_stddev'] = med_dev(val['bw'])
+# val['lat_mediana'], val['lat_stddev'] = med_dev(val['lat'])
+# yield val
-def load_files(*fnames):
- for fname in fnames:
- for i in load_data(open(fname).read()):
- yield i
+# def load_files(*fnames):
+# for fname in fnames:
+# for i in load_data(open(fname).read()):
+# yield i