aboutsummaryrefslogtreecommitdiffstats
path: root/data/ref_results/storage_benchmarks_indices.py
diff options
context:
space:
mode:
authorNauman_Ahad <nauman_ahad@xflowresearch.com>2016-02-01 17:03:50 +0500
committerNauman_Ahad <nauman_ahad@xflowresearch.com>2016-02-01 17:11:14 +0500
commit49b4662f32c415ea141ff269ba39d9a401b6e320 (patch)
tree68d44929f3ce9106660bcb0f69c70bf47669328c /data/ref_results/storage_benchmarks_indices.py
parent9c4e1e7f2021e9f05fa6e98cd212a6ddeb0fd2e5 (diff)
Fixed the index calculation for QTIP compute, network and storage suites
Earlier inaccurate index calculation updated. Now indices take into account vm and bm cases Change-Id: Icf2d7fc17ef765f5c0611b5371d57410ba155cb6 Signed-off-by: Nauman_Ahad <nauman_ahad@xflowresearch.com>
Diffstat (limited to 'data/ref_results/storage_benchmarks_indices.py')
-rw-r--r--data/ref_results/storage_benchmarks_indices.py47
1 files changed, 23 insertions, 24 deletions
diff --git a/data/ref_results/storage_benchmarks_indices.py b/data/ref_results/storage_benchmarks_indices.py
index 6114ad6b..db3890a0 100644
--- a/data/ref_results/storage_benchmarks_indices.py
+++ b/data/ref_results/storage_benchmarks_indices.py
@@ -1,35 +1,34 @@
-import os
-import json
+from index_calculation import generic_index as get_index
+from index_calculation import get_reference
from result_accum import result_concat as concat
+
def fio_index ():
- total_r=0
- total_w=0
fio_dict=concat('../../results/fio/')
- for k,v in fio_dict.iteritems():
- for i,j in fio_dict[k].iteritems():
- if i=="3 FIO result":
- for a,b in fio_dict[k][i].iteritems():
- for c,d in fio_dict[k][i][a].iteritems():
- if c=='read':
- raw_num=float(fio_dict[k][i][a][c]["IO/sec"])
- total_r=total_r+raw_num
- elif c=='write':
- raw_num=float(fio_dict[k][i][a][c]["IO/sec"])
- total_w=total_w+raw_num
+ #print _perf_dict
+ fio_r_bm_ref = get_reference('storage','fio_bm','read','IOPS')
+ fio_r_bm_index= get_index(fio_dict,'fio_bm',fio_r_bm_ref,'4 FIO result', 'Job_0','read','IO/sec')
+
+ fio_w_bm_ref = get_reference('storage','fio_bm','write','IOPS')
+ fio_w_bm_index= get_index(fio_dict,'fio_bm',fio_w_bm_ref,'4 FIO result', 'Job_0','write','IO/sec')
+
+ fio_bm_index= (fio_r_bm_index+fio_w_bm_index)/2
- l= len(fio_dict)
- with open ('./reference.json') as reference_file:
- reference_djson=json.load(reference_file)
- fio_ref_r=reference_djson['storage']['read']['IOPS']
- fio_ref_w=reference_djson['storage']['write']['IOPS']
- fio_index_r=float((total_r/l)/fio_ref_r)
- fio_index_w=float((total_w/l)/fio_ref_w)
- fio_index=float((fio_index_r+fio_index_w)/2)
+ fio_r_vm_ref = get_reference('storage','fio_vm','read','IOPS')
+ fio_r_vm_index= get_index(fio_dict,'fio_vm',fio_r_vm_ref,'4 FIO result', 'Job_0','read','IO/sec')
+
+ fio_w_vm_ref = get_reference('storage','fio_vm','write','IOPS')
+ fio_w_vm_index= get_index(fio_dict,'fio_vm',fio_w_vm_ref,'4 FIO result', 'Job_0','write','IO/sec')
+
+ fio_vm_index= (fio_r_vm_index+fio_w_vm_index)/2
+
+ fio_index=(fio_bm_index+fio_vm_index)/2
+ print fio_index
+
fio_dict_i={};
fio_dict_i['1. Index']=fio_index
fio_dict_i['2. Results']=fio_dict
return fio_dict_i
-
+