Skip to content

Commit

Permalink
Rounding, test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Mar 15, 2024
1 parent a6ec298 commit 7769fff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tools/benchcomp/benchcomp/visualizers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ def _get_template():
quadrant-3 3
quadrant-4 4
{%- for bench_name, bench_variants in d["scaled_metrics"][metric].items () %}
"{{ bench_name }}": [{{ bench_variants[d["scaled_variants"][metric][0]] }}, {{ bench_variants[d["scaled_variants"][metric][1]] }}]
{% set v0 = bench_variants[d["scaled_variants"][metric][0]] -%}
{% set v1 = bench_variants[d["scaled_variants"][metric][1]] -%}
"{{ bench_name }}": [{{ v0|round(3) }}, {{ v1|round(3) }}]
{%- endfor %}
```
Expand Down
4 changes: 2 additions & 2 deletions tools/benchcomp/test/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ def test_markdown_results_table(self):
quadrant-2 2
quadrant-3 3
quadrant-4 4
bench_1: [0.0, 1.0]
bench_2: [1.0, 0.0]
"bench_1": [0.0, 1.0]
"bench_2": [1.0, 0.0]
```
| Benchmark | variant_1 | variant_2 | ratio |
Expand Down

0 comments on commit 7769fff

Please sign in to comment.