Skip to content

Commit 23d0f89

Browse files
authored
Merge pull request #990 from rylev/allow-filtering-profile
Allow filtering comparisons by profile
2 parents a9bfea5 + f13383a commit 23d0f89

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

site/static/compare.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,10 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
551551

552552
let benches =
553553
data.comparisons.
554-
filter(n => filter.name && filter.name.trim() ? n.benchmark.includes(filter.name.trim()) : true).
554+
filter(n => {
555+
const f = filter.name && filter.name.trim();
556+
return !f || (n.benchmark + "-" + n.profile).includes(f);
557+
}).
555558
reduce((accum, next) => {
556559
accum[next.benchmark + "-" + next.profile] ||= [];
557560
accum[next.benchmark + "-" + next.profile].push(next);
@@ -781,4 +784,4 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
781784
</script>
782785
</body>
783786

784-
</html>
787+
</html>

0 commit comments

Comments
 (0)