freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][GSoC-2023-Ahmet] little fixes


From: @goksu
Subject: [Git][freetype/freetype][GSoC-2023-Ahmet] little fixes
Date: Tue, 01 Aug 2023 14:38:07 +0000

Ahmet Göksu pushed to branch GSoC-2023-Ahmet at FreeType / FreeType

Commits:

  • fae5e8c9
    by goksu at 2023-08-01T17:37:55+03:00
    little fixes
    

2 changed files:

Changes:

  • builds/testing.mk
    ... ... @@ -3,7 +3,7 @@ FTBENCH_DIR = $(TOP_DIR)/src/tools/ftbench
    3 3
     FTBENCH_SRC = $(FTBENCH_DIR)/ftbench.c
    
    4 4
     FTBENCH_OBJ = $(OBJ_DIR)/bench.$(SO)
    
    5 5
     FTBENCH_BIN = $(OBJ_DIR)/bench$E
    
    6
    -FTBENCH_FLAG ?= -c 500
    
    6
    +FTBENCH_FLAG ?= -c 100
    
    7 7
     INCLUDES = $(TOP_DIR)/include
    
    8 8
     FONTS = $(wildcard $(FTBENCH_DIR)/fonts/*.ttf)
    
    9 9
     BASELINE_DIR = $(OBJ_DIR)/baseline/
    
    ... ... @@ -100,7 +100,7 @@ baseline: $(FTBENCH_BIN) $(BASELINE_DIR)
    100 100
     		printf "\rProcessing %d%%..." $$percent; \
    
    101 101
     		$(FTBENCH_BIN) $(FTBENCH_FLAG) "$$font" > $(BASELINE_DIR)$$(basename $$font .ttf).txt; \
    
    102 102
     	done
    
    103
    -	@echo "\nBaseline created."
    
    103
    +	@echo "Baseline created."
    
    104 104
     
    
    105 105
     # Benchmark and compare to baseline
    
    106 106
     .PHONY: benchmark
    
    ... ... @@ -121,7 +121,7 @@ benchmark: $(FTBENCH_BIN) $(BENCHMARK_DIR)
    121 121
     		$(FTBENCH_BIN) $(FTBENCH_FLAG) "$$font" > $(BENCHMARK_DIR)$$(basename $$font .ttf).txt; \
    
    122 122
     	done
    
    123 123
     	@$(PYTHON) $(HTMLCREATOR) $(OBJ_DIR)
    
    124
    -	@echo "\nBenchmark created."
    
    124
    +	@echo "Benchmark results created in file: $(HTMLFILE)"
    
    125 125
     
    
    126 126
     .PHONY: clean-benchmark
    
    127 127
     clean-benchmark:
    

  • src/tools/ftbench/src/tohtml.py
    ... ... @@ -42,6 +42,7 @@ def main():
    42 42
             write_to_html(html_file, "<html>\n<head>\n")
    
    43 43
             write_to_html(html_file, CSS_STYLE)
    
    44 44
             write_to_html(html_file, "</head>\n<body>\n")
    
    45
    +        write_to_html(html_file, "<h1>Freetype Benchmark Results</h1>\n")
    
    45 46
     
    
    46 47
             baseline_info = parse_info_file(os.path.join(BASELINE_DIR, "info.txt"))
    
    47 48
             benchmark_info = parse_info_file(os.path.join(BENCHMARK_DIR, "info.txt"))
    
    ... ... @@ -49,7 +50,7 @@ def main():
    49 50
             if baseline_info[1].strip() == benchmark_info[1].strip():
    
    50 51
                 write_to_html(
    
    51 52
                     html_file,
    
    52
    -                '<h2 class="warning">Warning: Baseline and Benchmark have the same commit ID</h2>\n',
    
    53
    +                '<h2 class="warning">Warning: Baseline and Benchmark have the same commit ID!</h2>\n',
    
    53 54
                 )
    
    54 55
     
    
    55 56
             generate_info_table(html_file, baseline_info, benchmark_info)
    
    ... ... @@ -63,7 +64,7 @@ def main():
    63 64
                     generate_results_table(
    
    64 65
                         html_file, baseline_results, benchmark_results, filename
    
    65 66
                     )
    
    66
    -
    
    67
    +        write_to_html(html_file, "<center>Freetype Benchmark</center>\n")
    
    67 68
             write_to_html(html_file, "</body>\n</html>\n")
    
    68 69
     
    
    69 70
     def write_to_html(html_file, content):
    
    ... ... @@ -102,7 +103,7 @@ def generate_info_table(html_file, baseline_info, benchmark_info):
    102 103
                 ),
    
    103 104
             )
    
    104 105
         write_to_html(html_file, "</table><br/>")
    
    105
    -    write_to_html(html_file, "*Smaller values mean faster operation<br/>\n")
    
    106
    +    write_to_html(html_file, "* Smaller values mean faster operation<br/>\n")
    
    106 107
     
    
    107 108
     
    
    108 109
     def generate_results_table(html_file, baseline_results, benchmark_results, filename):
    
    ... ... @@ -118,8 +119,8 @@ def generate_results_table(html_file, baseline_results, benchmark_results, filen
    118 119
         write_to_html(
    
    119 120
             html_file,
    
    120 121
             '<tr><th>Test</th><th>N</th>\
    
    121
    -        <th><a href="">Baseline</a> (ms)</th>\
    
    122
    -        <th><a href="">Benchmark</a> (ms)</th>\
    
    122
    +        <th>* <a href="">Baseline</a> (ms)</th>\
    
    123
    +        <th>* <a href="">Benchmark</a> (ms)</th>\
    
    123 124
             <th>Difference (%)</th></tr>\n'.format(
    
    124 125
                 os.path.join(BASELINE_DIR, filename[:-4]),
    
    125 126
                 os.path.join(BENCHMARK_DIR, filename[:-4]),
    
    ... ... @@ -151,7 +152,7 @@ def generate_results_table(html_file, baseline_results, benchmark_results, filen
    151 152
                     n = (
    
    152 153
                         baseline_n
    
    153 154
                         if baseline_n == benchmark_n
    
    154
    -                    else baseline_n + " / " + benchmark_n
    
    155
    +                    else baseline_n + " | " + benchmark_n
    
    155 156
                     )
    
    156 157
     
    
    157 158
                     total_n += int(baseline_n)
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]