Skip to content

Commit bfba41c

Browse files
authored
Merge pull request intel#2510 from lukaszstolarczuk/fix-bench-template
Fix bench template
2 parents 13f5e52 + fd99700 commit bfba41c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/benchmarks/output_html.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

66
import re
7+
import os
8+
from pathlib import Path
79
import matplotlib.pyplot as plt
810
import mpld3
911
from collections import defaultdict
@@ -256,7 +258,9 @@ def generate_html(benchmark_runs: list[BenchmarkRun], github_repo: str, compare_
256258
suite_names = {t.suite for t in timeseries}
257259
suite_checkboxes_html = ' '.join(f'<label><input type="checkbox" class="suite-checkbox" data-suite="{suite}" checked> {suite}</label>' for suite in suite_names)
258260

259-
with open('benchmark_results.html.template', 'r') as file:
261+
script_path = os.path.dirname(os.path.realpath(__file__))
262+
results_template_path = Path(script_path, 'benchmark_results.html.template')
263+
with open(results_template_path, 'r') as file:
260264
html_template = file.read()
261265

262266
template = Template(html_template)

0 commit comments

Comments
 (0)