[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] gsoc-2023-ahmet-final e61380fe6 6/6: [tohtml] running args a
From: |
Werner Lemberg |
Subject: |
[freetype2] gsoc-2023-ahmet-final e61380fe6 6/6: [tohtml] running args again |
Date: |
Thu, 21 Sep 2023 20:27:43 -0400 (EDT) |
branch: gsoc-2023-ahmet-final
commit e61380fe6fdf5363f695b1ee153fafb85a9069e1
Author: goksu <25721443+goeksu@users.noreply.github.com>
Commit: goksu <25721443+goeksu@users.noreply.github.com>
[tohtml] running args again
python file is running by an OBJ_DIR directory.
---
benchmark.html | 30 ++++++++++++++++++++++++++++++
builds/testing.mk | 4 ++--
src/tools/ftbench/ftbench.c | 2 +-
src/tools/ftbench/src/tohtml.py | 9 +++++----
4 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/benchmark.html b/benchmark.html
new file mode 100644
index 000000000..cea447f20
--- /dev/null
+++ b/benchmark.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+
+ <style>
+ table {
+ table-layout: fixed;
+ }
+ th, td {
+ padding: 3px;
+ text-align: center;
+ }
+ th {
+ background-color: #ccc;
+ color: black;
+ }
+ .warning{
+ color: red;
+ }
+ .col1 {
+ background-color: #eee;
+ }
+
+
+ .highlight {
+ background-color: #0a0;
+ }
+ </style>
+</head>
+<body>
+<h1>Freetype Benchmark Results</h1>
diff --git a/builds/testing.mk b/builds/testing.mk
index 412d8b4ff..438689303 100644
--- a/builds/testing.mk
+++ b/builds/testing.mk
@@ -16,7 +16,7 @@ HTMLCREATOR = $(OBJ_DIR)/tohtml.py
HTMLFILE = $(OBJ_DIR)/benchmark.html
# Define flags, create default values in case of not inputted by user.
-FTBENCH_FLAG ?= -c 1000 -w 100
+FTBENCH_FLAG ?=
# Define all test fonts in the fonts folder.
BASELINE = $(addprefix $(BASELINE_DIR), $(notdir $(FONTS:.ttf=.txt)))
@@ -157,7 +157,7 @@ benchmark: $(FTBENCH_BIN) $(BENCHMARK_DIR) copy-html-script
printf "\nProcessing %d%%..." $$percent; \
$(FTBENCH_BIN) $(FTBENCH_FLAG) "$$font" >
$(BENCHMARK_DIR)$$(basename $$font .ttf).txt; \
done
- @$(PYTHON) $(HTMLCREATOR)
+ @$(PYTHON) $(HTMLCREATOR) $(OBJ_DIR)
@echo "Benchmark results created in file: $(HTMLFILE)"
####################################################################
diff --git a/src/tools/ftbench/ftbench.c b/src/tools/ftbench/ftbench.c
index 3522043d3..5ac3de9e2 100644
--- a/src/tools/ftbench/ftbench.c
+++ b/src/tools/ftbench/ftbench.c
@@ -304,7 +304,7 @@
}
if ( done )
- printf( "%10.3f us/op %10d done\n",
+ printf( "%10.3f microseconds %10d done\n",
TIMER_GET( &timer ) / (double)done, done );
else
printf( "no error-free calls\n" );
diff --git a/src/tools/ftbench/src/tohtml.py b/src/tools/ftbench/src/tohtml.py
index e5749d19c..cd058acd4 100644
--- a/src/tools/ftbench/src/tohtml.py
+++ b/src/tools/ftbench/src/tohtml.py
@@ -30,10 +30,10 @@ CSS_STYLE = """
}
</style>
"""
-
-BASELINE_DIR = "baseline"
-BENCHMARK_DIR = "benchmark"
-BENCHMARK_HTML = "benchmark.html"
+OBJ_DIR = sys.argv[1]
+BASELINE_DIR = os.path.join(OBJ_DIR, "baseline")
+BENCHMARK_DIR = os.path.join(OBJ_DIR, "benchmark")
+BENCHMARK_HTML = os.path.join(OBJ_DIR, "benchmark.html")
FONT_COUNT = 5
@@ -268,6 +268,7 @@ def generate_results_table(html_file, baseline_results,
benchmark_results, filen
baseline_match = re.match(
r"\s+(.*?)\s+(\d+\.\d+)\s+microseconds\s+(\d+)\s",
baseline_line
)
+
benchmark_match = re.match(
r"\s+(.*?)\s+(\d+\.\d+)\s+microseconds\s+(\d+)\s",
benchmark_line
)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] gsoc-2023-ahmet-final e61380fe6 6/6: [tohtml] running args again,
Werner Lemberg <=