Skip to content

Commit 98c239a

Browse files
committed
ci: benchmark: Define DOM classes
1 parent 42700c9 commit 98c239a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ci/github-actions/illustrate-benchmark-reports.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,15 @@ function renderReport(report: Report) {
4949
.map(shape => ({
5050
...shape,
5151
barColor: getBarColor(shape.index),
52+
labelClassName: `label ${shape.name}`,
53+
barClassName: `bar ${shape.name}`,
54+
numberClassName: `number ${shape.name}`,
5255
}))
5356
const labels = shapes.map(shape =>
5457
svg`<text
5558
data-index=${shape.index}
5659
data-name=${shape.name}
60+
class=${shape.labelClassName}
5761
x=${shape.labelX}
5862
y=${shape.textY}
5963
width=${shape.labelWidth}
@@ -68,6 +72,7 @@ function renderReport(report: Report) {
6872
svg`<rect
6973
data-index=${shape.index}
7074
data-name=${shape.name}
75+
class=${shape.barClassName}
7176
x=${shape.barX}
7277
y=${shape.barY}
7378
width=${shape.barWidth}
@@ -79,6 +84,7 @@ function renderReport(report: Report) {
7984
svg`<text
8085
data-index=${shape.index}
8186
data-name=${shape.name}
87+
class=${shape.numberClassName}
8288
x=${shape.numberX}
8389
y=${shape.textY}
8490
width=${numberColumnWidth}

0 commit comments

Comments
 (0)