Skip to content

Commit

Permalink
fix(perf-simple-query): fix results table
Browse files Browse the repository at this point in the history
When new column to perf simple query test is added it breaks the result
table.

Fix by getting available columns from current run and create table with
all of them. In case there's no result for that column in the past,
replace with `N/A`.

Fixes: #7496
  • Loading branch information
soyacz authored and fruch committed Jul 2, 2024
1 parent d2ea912 commit f4b36e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sdcm/utils/microbenchmarking/perf_simple_query_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def check_regression(self, test_id, mad_deviation_limit=0.02, regression_limit=0
return False

test_stats = self._get_perf_simple_query_result(doc)
columns = test_stats['stats'].keys()
test_details = self._get_test_details(doc)
if not (test_stats and test_details):
self.log.debug("Could not find test statistics, regression check is skipped")
Expand Down Expand Up @@ -109,8 +110,11 @@ def make_table_line_for_render(data):
table_line['test_version'] = data['results']['perf_simple_query_result']['versions'][
'scylla-server']
stats = data['results']['perf_simple_query_result']['stats']
for key, value in stats.items():
for key in columns:
value = stats.get(key, 'N/A')
table_line[key] = value
if value == 'N/A':
continue
if value > 0 and key != "mad tps":
diff = test_stats['stats'][key] / value
table_line["is_" + key + "_within_limits"] = False
Expand Down

0 comments on commit f4b36e5

Please sign in to comment.