Skip to content

Commit

Permalink
[Bench] Fix bench result's template path
Browse files Browse the repository at this point in the history
paths are relative to the place where the script was run from.
  • Loading branch information
lukaszstolarczuk committed Dec 30, 2024
1 parent fe6c83a commit fd99700
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/benchmarks/output_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

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

with open('benchmark_results.html.template', 'r') as file:
script_path = os.path.dirname(os.path.realpath(__file__))
results_template_path = Path(script_path, 'benchmark_results.html.template')
with open(results_template_path, 'r') as file:
html_template = file.read()

template = Template(html_template)
Expand Down

0 comments on commit fd99700

Please sign in to comment.