"""
data_x = list(in_data.keys())
- data_y = list(in_data.values())
+ data_y = [float(item) / 1e6 for item in in_data.values()]
hover_text = list()
xaxis = list()
f"{graph.get(u'title', u'')}."
)
)
- data = input_data.filter_data(graph, continue_on_error=True)
- if data is None:
+
+ if graph.get(u"include", None):
+ data = input_data.filter_tests_by_name(
+ graph, continue_on_error=True
+ )
+ else:
+ data = input_data.filter_data(graph, continue_on_error=True)
+
+ if data is None or data.empty:
logging.error(u"No data.")
return dict()
])
name_file = (
- f"{spec.cpta[u'output-file']}-{graph[u'output-file-name']}"
+ f"{spec.cpta[u'output-file']}/{graph[u'output-file-name']}"
f"{spec.cpta[u'output-file-type']}")
logs.append((u"INFO", f" Writing the file {name_file} ..."))
anomaly_classifications = dict()
- # Create the header:
+ # Create the table header:
csv_tables = dict()
for job_name in builds_dict:
if csv_tables.get(job_name, None) is None:
csv_tables[job_name] = list()
- header = u"Build Number:," + u",".join(builds_dict[job_name]) + u'\n'
+ header = f"Build Number:,{u','.join(builds_dict[job_name])}\n"
csv_tables[job_name].append(header)
build_dates = [x[0] for x in build_info[job_name].values()]
- header = u"Build Date:," + u",".join(build_dates) + u'\n'
+ header = f"Build Date:,{u','.join(build_dates)}\n"
csv_tables[job_name].append(header)
versions = [x[1] for x in build_info[job_name].values()]
- header = u"Version:," + u",".join(versions) + u'\n'
+ header = f"Version:,{u','.join(versions)}\n"
csv_tables[job_name].append(header)
for chart in spec.cpta[u"plots"]:
# Write the tables:
for job_name, csv_table in csv_tables.items():
- file_name = spec.cpta[u"output-file"] + u"-" + job_name + u"-trending"
+ file_name = f"{spec.cpta[u'output-file']}/{job_name}-trending"
with open(f"{file_name}.csv", u"w") as file_handler:
file_handler.writelines(csv_table)
result = u"PASS"
for job_name, job_data in anomaly_classifications.items():
file_name = \
- f"{spec.cpta[u'output-file']}-regressions-{job_name}.txt"
+ f"{spec.cpta[u'output-file']}/regressions-{job_name}.txt"
with open(file_name, u'w') as txt_file:
for test_name, classification in job_data.items():
if classification == u"regression":
if classification in (u"regression", u"outlier"):
result = u"FAIL"
file_name = \
- f"{spec.cpta[u'output-file']}-progressions-{job_name}.txt"
+ f"{spec.cpta[u'output-file']}/progressions-{job_name}.txt"
with open(file_name, u'w') as txt_file:
for test_name, classification in job_data.items():
if classification == u"progression":