Ahmet Göksu pushed to branch gsoc-2023-ahmet-final at FreeType / FreeType
Commits:
-
e61380fe
by goksu at 2023-09-21T15:34:38+03:00
4 changed files:
Changes:
1 | +<html>
|
|
2 | +<head>
|
|
3 | + |
|
4 | + <style>
|
|
5 | + table {
|
|
6 | + table-layout: fixed;
|
|
7 | + }
|
|
8 | + th, td {
|
|
9 | + padding: 3px;
|
|
10 | + text-align: center;
|
|
11 | + }
|
|
12 | + th {
|
|
13 | + background-color: #ccc;
|
|
14 | + color: black;
|
|
15 | + }
|
|
16 | + .warning{
|
|
17 | + color: red;
|
|
18 | + }
|
|
19 | + .col1 {
|
|
20 | + background-color: #eee;
|
|
21 | + }
|
|
22 | + |
|
23 | + |
|
24 | + .highlight {
|
|
25 | + background-color: #0a0;
|
|
26 | + }
|
|
27 | + </style>
|
|
28 | +</head>
|
|
29 | +<body>
|
|
30 | +<h1>Freetype Benchmark Results</h1> |
... | ... | @@ -16,7 +16,7 @@ HTMLCREATOR = $(OBJ_DIR)/tohtml.py |
16 | 16 | HTMLFILE = $(OBJ_DIR)/benchmark.html
|
17 | 17 | |
18 | 18 | # Define flags, create default values in case of not inputted by user.
|
19 | -FTBENCH_FLAG ?= -c 1000 -w 100
|
|
19 | +FTBENCH_FLAG ?=
|
|
20 | 20 | |
21 | 21 | # Define all test fonts in the fonts folder.
|
22 | 22 | BASELINE = $(addprefix $(BASELINE_DIR), $(notdir $(FONTS:.ttf=.txt)))
|
... | ... | @@ -157,7 +157,7 @@ benchmark: $(FTBENCH_BIN) $(BENCHMARK_DIR) copy-html-script |
157 | 157 | printf "\nProcessing %d%%..." $$percent; \
|
158 | 158 | $(FTBENCH_BIN) $(FTBENCH_FLAG) "$$font" > $(BENCHMARK_DIR)$$(basename $$font .ttf).txt; \
|
159 | 159 | done
|
160 | - @$(PYTHON) $(HTMLCREATOR)
|
|
160 | + @$(PYTHON) $(HTMLCREATOR) $(OBJ_DIR)
|
|
161 | 161 | @echo "Benchmark results created in file: $(HTMLFILE)"
|
162 | 162 | |
163 | 163 | ####################################################################
|
... | ... | @@ -304,7 +304,7 @@ |
304 | 304 | }
|
305 | 305 | |
306 | 306 | if ( done )
|
307 | - printf( "%10.3f us/op %10d done\n",
|
|
307 | + printf( "%10.3f microseconds %10d done\n",
|
|
308 | 308 | TIMER_GET( &timer ) / (double)done, done );
|
309 | 309 | else
|
310 | 310 | printf( "no error-free calls\n" );
|
... | ... | @@ -30,10 +30,10 @@ CSS_STYLE = """ |
30 | 30 | }
|
31 | 31 | </style>
|
32 | 32 | """
|
33 | - |
|
34 | -BASELINE_DIR = "baseline"
|
|
35 | -BENCHMARK_DIR = "benchmark"
|
|
36 | -BENCHMARK_HTML = "benchmark.html"
|
|
33 | +OBJ_DIR = sys.argv[1]
|
|
34 | +BASELINE_DIR = os.path.join(OBJ_DIR, "baseline")
|
|
35 | +BENCHMARK_DIR = os.path.join(OBJ_DIR, "benchmark")
|
|
36 | +BENCHMARK_HTML = os.path.join(OBJ_DIR, "benchmark.html")
|
|
37 | 37 | |
38 | 38 | FONT_COUNT = 5
|
39 | 39 | |
... | ... | @@ -268,6 +268,7 @@ def generate_results_table(html_file, baseline_results, benchmark_results, filen |
268 | 268 | baseline_match = re.match(
|
269 | 269 | r"\s+(.*?)\s+(\d+\.\d+)\s+microseconds\s+(\d+)\s", baseline_line
|
270 | 270 | )
|
271 | + |
|
271 | 272 | benchmark_match = re.match(
|
272 | 273 | r"\s+(.*?)\s+(\d+\.\d+)\s+microseconds\s+(\d+)\s", benchmark_line
|
273 | 274 | )
|