Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit038aad6

Browse files
Add zero folders found check, thus no benchmarks to be displayed
1 parent6be1576 commit038aad6

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

‎_layouts/benchmarks.html‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<imgclass="logo"src="{{site.baseurl}}/assets/img/rust-python-logo.svg"alt="RustPython Logo">
1010
</div>
1111
<divclass="pl-md-2">
12-
<divclass="section-title">Benchmarks</div>
13-
<divclass="title">{{site.title }} {{page.title | escape }}</div>
12+
<divclass="section-title">RustPython</div>
13+
<divclass="title">{{ page.title | escape }}</div>
1414
<small>{{ site.benchmarks-intro }}</small>
1515
</div>
1616
</div>
@@ -22,8 +22,6 @@
2222
{{ content }}
2323
</div>
2424

25-
<!-- TODO clean up this code a bit -->
26-
2725
{% assign folders = "" | split: ", " %}
2826
{% for image in site.static_files %}
2927
{% if image.path contains 'criterion/' %}
@@ -48,9 +46,11 @@
4846
{% endfor%}
4947
{% assign folders = folders | uniq %} -->
5048

51-
<!-- TODO check if the folders list is empty, if so, display corresponding message -->
52-
<!-- TODO add text that explains the violin plots -->
53-
49+
{% if folders.size == 0 %}
50+
<pstyle="color: red;">There are no benchmarks to be displayed.</p>
51+
<p>This shouldn't be happening, please contact one of the maintainers
52+
through<ahref="https://gitter.im/rustpython/Lobby">Gitter</a> to report this problem.</p>
53+
{% else %}
5454
<ulclass="tab"data-tab="benchmarks">
5555
{% for folder in folders %}
5656
<li{%ifforloop.index==1%}class="active"{%endif%}>
@@ -65,12 +65,13 @@
6565
{% for image in site.static_files %}
6666
{% if image.path contains folder %}
6767
<figure>
68-
<imgsrc="{{ site.baseurl }}{{ image.path }}"alt="image"width="50%"/>
68+
<imgsrc="{{ site.baseurl }}{{ image.path }}"alt="image"/>
6969
<figcaption>{{ image.name }}</figcaption>
7070
</figure>
7171
{% endif %}
7272
{% endfor%}
7373
</li>
7474
{% endfor%}
7575
</ul>
76+
{% endif %}
7677
</div>

‎benchmarks.markdown‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ layout: benchmarks
33
title:Benchmarks
44
---
55

6-
RustPython is an awesome Python interpreter! On this page you can see how it compares to CPython.
6+
This page displays some benchmarks that determine the performance of RustPython.
7+
8+
Most of these benchmarks compare RustPython to CPython.
9+
10+
More information about the benchmarks can be found on[the RustPython GitHub repo](https://github.com/RustPython/RustPython/tree/master/benches).

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp