From f2c7d4bf894f57577bbc515f00e5a1c91df952a8 Mon Sep 17 00:00:00 2001 From: goksu <25721443+goeksu@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:23:47 +0300 Subject: [PATCH] last changes --- builds/testing.mk | 4 ++-- src/tools/ftbench/src/tohtml.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/builds/testing.mk b/builds/testing.mk index a600bb08e..c3771cba5 100644 --- a/builds/testing.mk +++ b/builds/testing.mk @@ -121,7 +121,7 @@ baseline: $(FTBENCH_BIN) $(BASELINE_DIR) for font in $${fonts[@]}; do \ step=$$((step+1)); \ percent=$$((step * 100 / total_fonts)); \ - printf "\rProcessing %d%%..." $$percent; \ + printf "\nProcessing %d%%..." $$percent; \ $(FTBENCH_BIN) $(FTBENCH_FLAG) "$$font" > $(BASELINE_DIR)$$(basename $$font .ttf).txt; \ done @echo "Baseline created." @@ -141,7 +141,7 @@ benchmark: $(FTBENCH_BIN) $(BENCHMARK_DIR) copy-html-script for font in $${fonts[@]}; do \ step=$$((step+1)); \ percent=$$((step * 100 / total_fonts)); \ - printf "\rProcessing %d%%..." $$percent; \ + printf "\nProcessing %d%%..." $$percent; \ $(FTBENCH_BIN) $(FTBENCH_FLAG) "$$font" > $(BENCHMARK_DIR)$$(basename $$font .ttf).txt; \ done @$(PYTHON) $(HTMLCREATOR) $(OBJ_DIR) diff --git a/src/tools/ftbench/src/tohtml.py b/src/tools/ftbench/src/tohtml.py index bbc11a420..32c86fb8d 100644 --- a/src/tools/ftbench/src/tohtml.py +++ b/src/tools/ftbench/src/tohtml.py @@ -39,7 +39,7 @@ FONT_COUNT = 5 WARNING_SAME_COMMIT = "Warning: Baseline and Benchmark have the same commit ID!" INFO_1 = "* Average time for single iteration. Smaller values are better." -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." +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." @@ -189,7 +189,7 @@ def generate_total_results_table(html_file, baseline_dir, benchmark_dir): n_display = f"{n_baseline:.0f} | {n_benchmark:.0f}" if n_baseline != n_benchmark else int(n_baseline) - diff = ((baseline - benchmark) / baseline) * 100 + diff = ((baseline - benchmark) / baseline) * 100 if not (baseline - benchmark) == 0 else 0 # Calculate for total row total_baseline += baseline @@ -210,7 +210,7 @@ def generate_total_results_table(html_file, baseline_dir, benchmark_dir): - total_diff = ((total_baseline - total_benchmark) / total_baseline) * 100 + total_diff = ((total_baseline - total_benchmark) / total_baseline) * 100 if not (total_baseline - total_benchmark) == 0 else 0 total_n_display = f"{total_n_baseline} | {total_n_benchmark}" if total_n_baseline != total_n_benchmark else str(total_n_baseline) write_to_html( @@ -270,7 +270,7 @@ def generate_results_table(html_file, baseline_results, benchmark_results, filen percentage_diff = ( (baseline_value - benchmark_value) / baseline_value - ) * 100 + ) * 100 if not (baseline_value - benchmark_value) == 0 else 0 baseline_n = baseline_match.group(3) benchmark_n = benchmark_match.group(3)