Skip to content

Commit

Permalink
Add time when the website was generated
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Feb 28, 2024
1 parent d7283ae commit 8753c7c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions tools/performance/engine-benchmarks/bench_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ def _parse_bench_source(_bench_source: str) -> Source:
bench_datas=template_bench_datas,
bench_source=bench_source,
branches=branches,
timestamp=datetime.now()
)

# Render Jinja template with jinja_data
Expand Down
2 changes: 2 additions & 0 deletions tools/performance/engine-benchmarks/bench_tool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ class JinjaData:
until: datetime
display_since: datetime
""" The date from which all the datapoints are first displayed """
timestamp: datetime
""" The time when the website was generated """



1 change: 1 addition & 0 deletions tools/performance/engine-benchmarks/bench_tool/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ async def generate_bench_website(
bench_datas=template_bench_datas,
bench_source=bench_source,
branches=[BRANCH_DEVELOP],
timestamp=datetime.now()
)
_logger.debug(f"Rendering HTML to {generated_html}")
render_html(jinja_data, generated_html)
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ <h2 class="text-center">
</p>

<br />
Generated by the <code>bench_download.py</code> script.
Generated by the <code>bench_download.py</code> script in <code>{{ timestamp }}</code>.
</div>

<div id="top-panel" class="container">
Expand Down

0 comments on commit 8753c7c

Please sign in to comment.