return (settings, results)
def extract(data, params={}, ty='read', index=0):
+ if ty == 'mixed':
+ ty = ('read', 'write')
+ else:
+ ty = (ty,)
+
results = {}
for (s, r) in data:
match = True
ops = int(s['BENCH_OPS'])
- vals = [x[ty][index] for x in r]
- vals = vals[5:]
+ vs = 0.0
+ for t in ty:
+ vals = [x[t][index] for x in r]
+ vals = vals[5:]
+ vs += sum(vals) / len(vals)
+ results[ops] = vs
- results[ops] = sum(vals) / len(vals)
return results
data = []
if f.endswith('.settings'):
data.append(load_results('results/' + f[:-len('.settings')]))
+ratios = {'read': '0.0', 'write': '1.0', 'mixed': '0.5'}
+
for size in [128, 512, 1024, 2048]:
- params = {'BLUESKY_TARGET': 'native', 'BENCH_WRITERATIO': '1.0',
- 'BENCH_FILECOUNT': str(size / 4)}
+ for blocksize in [4096, 32768]:
+ for ratio in ratios:
+ params = {'BLUESKY_TARGET': 's3',
+ 'BENCH_WRITERATIO': ratios[ratio],
+ 'BENCH_FILECOUNT': str(size),
+ 'BENCH_BLOCKSIZE': str(blocksize)}
- d0 = extract(data, params, ty='write', index=0)
- d1 = extract(data, params, ty='write', index=1)
+ d0 = extract(data, params, ty=ratio, index=0)
+ d1 = extract(data, params, ty=ratio, index=1)
- fp = open('%s-%d-write.data' % (params['BLUESKY_TARGET'], size), 'w')
- for k in sorted(d0.keys()):
- fp.write("%d\t%f\t%f\n" % (k, d0[k], d1[k]))
- fp.close()
+ fp = open('%s-%d-%s-%dk.data' % (params['BLUESKY_TARGET'], size, ratio, blocksize / 1024), 'w')
+ for k in sorted(d0.keys()):
+ fp.write("%d\t%f\t%f\n" % (k, d0[k], d1[k]))
+ fp.close()