Skip to content
Merged
Changes from all commits
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
benchmarks: Hide data/ folder
The `data/` folder contains raw data.

It should not be displayed in the tabs, and its `*.cbor` files should not be rendered
  • Loading branch information
homersimpsons authored Feb 25, 2024
commit ccb78e721e7628cc4fd492dbd9712bdc9297f396
14 changes: 9 additions & 5 deletions _layouts/benchmarks.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@
{% assign folders = "" | split: ", " %}
{% for folder in site.static_files %}
{% if folder.path contains 'criterion/' %}
{% unless folder.path contains 'criterion/data/' %}
{% assign temp = folder.path | split: 'criterion/' %}
{% assign pathName = temp[1] | split: '/' | first %}
{% assign pathName = pathName | split: ", " %}
{% assign folders = folders | concat: pathName %}
{% assign directoryName = temp[1] | split: '/' | first %}
{% assign pathName = 'criterion/' | append: directoryName %}
{% assign pathNameArray = pathName | split: ", " %}
{% assign folders = folders | concat: pathNameArray %}
{% endunless %}
{% endif %}
{% endfor%}
{% endfor %}
{% comment %}folders = ['criterion/execution', 'criterion/microbenchmarks', ...]{% endcomment %}
{% assign folders = folders | uniq %}

{% if folders.size == 0 %}
Expand All @@ -41,7 +45,7 @@
<ul class="tab" data-tab="benchmarks">
{% for folder in folders %}
<li {% if forloop.index==1 %} class="active" {% endif %} style="font-weight: bold;">
<a href="">{{ folder }}</a>
<a href="">{{ folder | split: '/' | last }}</a>
</li>
{% endfor%}
</ul>
Expand Down