aboutsummaryrefslogtreecommitdiffstats
path: root/tools/opnfvdashboard/opnfvdashboard.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-08-24 09:01:41 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-24 09:01:41 +0000
commit7032b8ec49833084b9e7c06442a9756a3ec7e501 (patch)
tree3d47fca7f8f33a1465add7f0cc8457d671a83036 /tools/opnfvdashboard/opnfvdashboard.py
parentffc0fc7902e2f46cb5982f55aacd262073f08e1c (diff)
parentc9ae2766fd566358a1ac3a38a7dc6f7b22a3449f (diff)
Merge "opnfvresultdb: Update data reported to result DB"
Diffstat (limited to 'tools/opnfvdashboard/opnfvdashboard.py')
-rw-r--r--tools/opnfvdashboard/opnfvdashboard.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/opnfvdashboard/opnfvdashboard.py b/tools/opnfvdashboard/opnfvdashboard.py
index 3f465c04..c24b9f8c 100644
--- a/tools/opnfvdashboard/opnfvdashboard.py
+++ b/tools/opnfvdashboard/opnfvdashboard.py
@@ -45,12 +45,20 @@ def _push_results(reader, int_data):
version = ""
allowed_pkt = ["64", "128", "512", "1024", "1518"]
details = {"64": '', "128": '', "512": '', "1024": '', "1518": ''}
+ test_start = None
+ test_stop = None
for row_reader in reader:
if allowed_pkt.count(row_reader['packet_size']) == 0:
logging.error("The framesize is not supported in opnfv dashboard")
continue
+ # test execution time includes all frame sizes, so start & stop time
+ # is the same (repeated) for every framesize in CSV file
+ if test_start is None:
+ test_start = row_reader['start_time']
+ test_stop = row_reader['stop_time']
+
casename = _generate_test_name(row_reader['id'], int_data)
if "back2back" in row_reader['id']:
details[row_reader['packet_size']] = row_reader['b2b_frames']
@@ -73,10 +81,15 @@ def _push_results(reader, int_data):
# Build body
body = {"project_name": "vsperf",
+ "scenario": "vsperf",
+ "start_date": test_start,
+ "stop_date": test_stop,
"case_name": casename,
"pod_name": int_data['pod'],
"installer": int_data['installer'],
"version": version,
+ "build_tag": int_data['build_tag'],
+ "criteria": int_data['criteria'],
"details": details}
my_data = requests.post(url, json=body)