-c 50 arg added
This commit is contained in:
parent
f5713fa136
commit
46551f7ef8
@ -2,6 +2,7 @@
|
||||
FTBENCH_DIR = $(TOP_DIR)/src/tools/ftbench
|
||||
FTBENCH_SRC = $(FTBENCH_DIR)/ftbench.c
|
||||
FTBENCH_BIN = $(OBJ_DIR)/bench.o
|
||||
FTBENCH_FLAG = -c 50
|
||||
FONTS = $(wildcard $(FTBENCH_DIR)/fonts/*.ttf)
|
||||
BASELINE = $(addprefix $(FTBENCH_DIR)/baseline/, $(notdir $(FONTS:.ttf=.txt)))
|
||||
BENCHMARK = $(addprefix $(FTBENCH_DIR)/benchmark/, $(notdir $(FONTS:.ttf=.txt)))
|
||||
@ -25,7 +26,7 @@ $(FTBENCH_BIN): $(FTBENCH_SRC) | $(OBJ_DIR)
|
||||
baseline: $(FTBENCH_BIN) $(BASELINE_DIR)
|
||||
@echo "Creating baseline..."
|
||||
@$(foreach font, $(FONTS), \
|
||||
$(FTBENCH_BIN) $(font) > $(BASELINE_DIR)$(notdir $(font:.ttf=.txt)); \
|
||||
$(FTBENCH_BIN) $(FTBENCH_FLAG) $(font) > $(BASELINE_DIR)$(notdir $(font:.ttf=.txt)); \
|
||||
)
|
||||
@echo "Baseline created."
|
||||
|
||||
@ -34,9 +35,9 @@ baseline: $(FTBENCH_BIN) $(BASELINE_DIR)
|
||||
benchmark: $(FTBENCH_BIN) $(BENCHMARK_DIR)
|
||||
@echo "Creating benchmark..."
|
||||
@$(foreach font, $(FONTS), \
|
||||
$(FTBENCH_BIN) $(font) > $(BENCHMARK_DIR)$(notdir $(font:.ttf=.txt)); \
|
||||
$(FTBENCH_BIN) $(FTBENCH_FLAG) $(font) > $(BENCHMARK_DIR)$(notdir $(font:.ttf=.txt)); \
|
||||
)
|
||||
@$(PYTHON) $(HTMLCREATOR) > $(HTMLFILE)
|
||||
@$(PYTHON) $(HTMLCREATOR)
|
||||
@echo "Benchmark created."
|
||||
|
||||
.PHONY: clean-benchmark
|
||||
|
@ -2,7 +2,15 @@ import os
|
||||
import re
|
||||
|
||||
# Create the HTML file
|
||||
with open('../../../../benchmark.html', 'w') as f:
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
# Get the project root directory (assuming the script is inside nested directories in the project root)
|
||||
project_root = os.path.abspath(os.path.join(current_dir, '../../../../'))
|
||||
|
||||
# Construct the absolute path to the benchmark file
|
||||
benchmark_file = os.path.join(project_root, 'benchmark.html')
|
||||
|
||||
with open(benchmark_file, 'w') as f:
|
||||
f.write('<html>\n')
|
||||
f.write('<head>\n')
|
||||
f.write('<title>Benchmark Results</title>\n')
|
||||
@ -10,10 +18,10 @@ with open('../../../../benchmark.html', 'w') as f:
|
||||
f.write('<body>\n')
|
||||
f.write('<h1>Benchmark Results</h1>\n')
|
||||
|
||||
# Traverse through the 'baselines' directory
|
||||
for filename in os.listdir('../baseline'):
|
||||
baseline_filepath = os.path.join('../baseline', filename)
|
||||
benchmark_filepath = os.path.join('../benchmark', filename)
|
||||
# Traverse through the 'baseline directory
|
||||
for filename in os.listdir(os.path.join(project_root, 'src/tools/ftbench/baseline')):
|
||||
baseline_filepath = os.path.join(os.path.join(project_root, 'src/tools/ftbench/baseline'), filename)
|
||||
benchmark_filepath = os.path.join(os.path.join(project_root, 'src/tools/ftbench/benchmark'), filename)
|
||||
|
||||
# Process the baseline file
|
||||
with open(baseline_filepath, 'r') as baseline_file:
|
||||
|
Loading…
Reference in New Issue
Block a user