aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/core/report.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/core/report.py')
-rw-r--r--yardstick/benchmark/core/report.py30
1 files changed, 24 insertions, 6 deletions
diff --git a/yardstick/benchmark/core/report.py b/yardstick/benchmark/core/report.py
index 587c85a14..e5dc62050 100644
--- a/yardstick/benchmark/core/report.py
+++ b/yardstick/benchmark/core/report.py
@@ -342,25 +342,43 @@ class Report(object):
"""Start NSB report generation."""
_, report_data = self._generate_common(args)
report_time = report_data.pop('Timestamp')
- report_keys = sorted(report_data, key=str.lower)
- report_tree = JSTree().format_for_jstree(report_keys)
report_meta = {
"testcase": self.yaml_name,
"task_id": self.task_id,
}
+ yardstick_data = {}
+ for i, t in enumerate(report_time):
+ for m in report_data:
+ if not yardstick_data.get(m):
+ yardstick_data[m] = {}
+ yardstick_data[m][t] = report_data[m][i]
+
+ baro_data = self._get_baro_metrics()
+ baro_timestamps = baro_data.pop('Timestamp')
+
+ yard_timestamps = report_time
+ report_time = self._combine_times(yard_timestamps, baro_timestamps)
+
+ combo_metrics, combo_keys, combo_table = self._combine_metrics(
+ baro_data, baro_timestamps, yardstick_data, yard_timestamps)
+ combo_time = self._combine_times(baro_timestamps, yard_timestamps)
+ combo_tree = JSTree().format_for_jstree(combo_keys)
+
template_dir = consts.YARDSTICK_ROOT_PATH + "yardstick/common"
template_environment = jinja2.Environment(
autoescape=False,
loader=jinja2.FileSystemLoader(template_dir),
lstrip_blocks=True)
+ combo_data = combo_metrics
context = {
"report_meta": report_meta,
- "report_data": report_data,
- "report_time": report_time,
- "report_keys": report_keys,
- "report_tree": report_tree,
+ "report_data": combo_data,
+ "report_time": combo_time,
+ "report_keys": combo_keys,
+ "report_tree": combo_tree,
+ "table_data": combo_table,
}
template_html = template_environment.get_template("nsb_report.html.j2")