aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/scripts/ref_results/network_benchmarks_indices.py
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-01-08 09:48:31 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-01-11 15:14:16 +0800
commit23b627df622eeafafa215ce19764310c1d55dd55 (patch)
treed92c4c9b8a50a03461a40d2a2aba67bc7312041a /legacy/scripts/ref_results/network_benchmarks_indices.py
parent23f48e46a46976ae6f6d97aea11440e6a8b63121 (diff)
Reorganize the project folders
Code from Brahmaputra is no longer maintained, including: - docker - playbooks - scripts - utils They are moved to legacy folder to avoid unnecessary confusion to new developers. Change-Id: Ia50383ca5c3bd82571eb7b2184e7f83e264ff8a7 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'legacy/scripts/ref_results/network_benchmarks_indices.py')
-rw-r--r--legacy/scripts/ref_results/network_benchmarks_indices.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/legacy/scripts/ref_results/network_benchmarks_indices.py b/legacy/scripts/ref_results/network_benchmarks_indices.py
new file mode 100644
index 00000000..c19d18eb
--- /dev/null
+++ b/legacy/scripts/ref_results/network_benchmarks_indices.py
@@ -0,0 +1,20 @@
+from index_calculation import generic_index as get_index
+from index_calculation import get_reference
+from result_accum import result_concat as concat
+
+
+def iperf_index():
+ iperf_dict = concat('results/iperf/')
+ iperf_bm_ref = get_reference('network', 'iperf_bm', 'throughput received(b/s)')
+ iperf_bm_index = get_index(iperf_dict, 'iperf_bm', iperf_bm_ref, 'details', 'bandwidth', 'received_throughput')
+ iperf_vm_ref = get_reference('network', 'iperf_vm', 'throughput received(b/s)')
+ iperf_vm_index = get_index(iperf_dict, 'iperf_vm', iperf_vm_ref, 'details', 'bandwidth', 'received_throughput')
+
+ iperf_vm_2_ref = get_reference('network', 'iperf_vm_2', 'throughput received(b/s)')
+ iperf_vm_2_index = get_index(iperf_dict, 'iperf_vm_2', iperf_vm_2_ref, 'details', 'bandwidth', 'received_throughput')
+ iperf_index = float(iperf_bm_index + iperf_vm_index + iperf_vm_2_index) / 3
+ print iperf_index
+ iperf_dict_i = {}
+ iperf_dict_i['index'] = iperf_index
+ iperf_dict_i['results'] = iperf_dict
+ return iperf_dict_i