Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add zero folders found check, thus no benchmarks to be displayed
  • Loading branch information
theangryhobbit committed Mar 30, 2021
commit 038aad6246bd36b9cf8e3f8659322bb1f2c5f7bf
17 changes: 9 additions & 8 deletions _layouts/benchmarks.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<img class="logo" src="{{site.baseurl}}/assets/img/rust-python-logo.svg" alt="RustPython Logo">
</div>
<div class="pl-md-2">
<div class="section-title">Benchmarks</div>
<div class="title">{{ site.title }} {{ page.title | escape }}</div>
<div class="section-title">RustPython</div>
<div class="title">{{ page.title | escape }}</div>
<small>{{ site.benchmarks-intro }}</small>
</div>
</div>
Expand All @@ -22,8 +22,6 @@
{{ content }}
</div>

<!-- TODO clean up this code a bit -->

{% assign folders = "" | split: ", " %}
{% for image in site.static_files %}
{% if image.path contains 'criterion/' %}
Expand All @@ -48,9 +46,11 @@
{% endfor%}
{% assign folders = folders | uniq %} -->

<!-- TODO check if the folders list is empty, if so, display corresponding message -->
<!-- TODO add text that explains the violin plots -->

{% if folders.size == 0 %}
<p style="color: red;">There are no benchmarks to be displayed.</p>
<p>This shouldn't be happening, please contact one of the maintainers
through <a href="https://gitter.im/rustpython/Lobby">Gitter</a> to report this problem.</p>
{% else %}
<ul class="tab" data-tab="benchmarks">
{% for folder in folders %}
<li {% if forloop.index==1 %} class="active" {% endif %}>
Expand All @@ -65,12 +65,13 @@
{% for image in site.static_files %}
{% if image.path contains folder %}
<figure>
<img src="{{ site.baseurl }}{{ image.path }}" alt="image" width="50%" />
<img src="{{ site.baseurl }}{{ image.path }}" alt="image" />
<figcaption>{{ image.name }}</figcaption>
</figure>
{% endif %}
{% endfor%}
</li>
{% endfor%}
</ul>
{% endif %}
</div>
6 changes: 5 additions & 1 deletion benchmarks.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ layout: benchmarks
title: Benchmarks
---

RustPython is an awesome Python interpreter! On this page you can see how it compares to CPython.
This page displays some benchmarks that determine the performance of RustPython.

Most of these benchmarks compare RustPython to CPython.

More information about the benchmarks can be found on [the RustPython GitHub repo](https://github.com/RustPython/RustPython/tree/master/benches).