... |
... |
@@ -39,7 +39,7 @@ FONT_COUNT = 5 |
39
|
39
|
|
40
|
40
|
WARNING_SAME_COMMIT = "Warning: Baseline and Benchmark have the same commit ID!"
|
41
|
41
|
INFO_1 = "* Average time for single iteration. Smaller values are better."
|
42
|
|
-INFO_2 = "* If a value in the 'Iterations' column is given as '*x* | *y*', values *x* and *y* give the number of iterations in the baseline and the benchmark test, respectively."
|
|
42
|
+INFO_2 = "* If a value in the 'Iterations' column is given as '<i>x | y</i>', values <i>x</i> and <i>y</i> give the number of iterations in the baseline and the benchmark test, respectively."
|
43
|
43
|
|
44
|
44
|
|
45
|
45
|
|
... |
... |
@@ -189,7 +189,7 @@ def generate_total_results_table(html_file, baseline_dir, benchmark_dir): |
189
|
189
|
|
190
|
190
|
n_display = f"{n_baseline:.0f} | {n_benchmark:.0f}" if n_baseline != n_benchmark else int(n_baseline)
|
191
|
191
|
|
192
|
|
- diff = ((baseline - benchmark) / baseline) * 100
|
|
192
|
+ diff = ((baseline - benchmark) / baseline) * 100 if not (baseline - benchmark) == 0 else 0
|
193
|
193
|
|
194
|
194
|
# Calculate for total row
|
195
|
195
|
total_baseline += baseline
|
... |
... |
@@ -210,7 +210,7 @@ def generate_total_results_table(html_file, baseline_dir, benchmark_dir): |
210
|
210
|
|
211
|
211
|
|
212
|
212
|
|
213
|
|
- total_diff = ((total_baseline - total_benchmark) / total_baseline) * 100
|
|
213
|
+ total_diff = ((total_baseline - total_benchmark) / total_baseline) * 100 if not (total_baseline - total_benchmark) == 0 else 0
|
214
|
214
|
total_n_display = f"{total_n_baseline} | {total_n_benchmark}" if total_n_baseline != total_n_benchmark else str(total_n_baseline)
|
215
|
215
|
|
216
|
216
|
write_to_html(
|
... |
... |
@@ -270,7 +270,7 @@ def generate_results_table(html_file, baseline_results, benchmark_results, filen |
270
|
270
|
|
271
|
271
|
percentage_diff = (
|
272
|
272
|
(baseline_value - benchmark_value) / baseline_value
|
273
|
|
- ) * 100
|
|
273
|
+ ) * 100 if not (baseline_value - benchmark_value) == 0 else 0
|
274
|
274
|
|
275
|
275
|
baseline_n = baseline_match.group(3)
|
276
|
276
|
benchmark_n = benchmark_match.group(3)
|