Skip to content

Commit f82da73

Browse files
authored
fix(html-summary): if unit is % multiply value by 100 (#291)
Signed-off-by: Pavel Macík <pavel.macik@gmail.com>
1 parent 8d7ce91 commit f82da73

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ci-scripts/scalability/rhdh-perf-chart.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ def generate_chart(metric, csv_files, labels, x_axis, x_scale, metadata=None):
211211
# Convert memory from bytes to MB if metric is memory
212212
if 'memory' in metric.lower():
213213
value = value / (1024 * 1024)
214+
# Multiply by 100 if unit is percentage
215+
if metadata and 'metrics' in metadata and metric in metadata['metrics']:
216+
metric_info = metadata['metrics'][metric]
217+
if 'units' in metric_info and metric_info['units'] == '%':
218+
value = value * 100
214219
x_vals.append(x_val)
215220
metric_values.append(value)
216221
except (KeyError, ValueError):

0 commit comments

Comments
 (0)