@@ -20,39 +20,6 @@ const props = defineProps<{
20
20
stat: string ;
21
21
}>();
22
22
23
- function benchmarkLink(benchmark : string ): string {
24
- return ` https://github.com/rust-lang/rustc-perf/tree/master/collector/compile-benchmarks/${benchmark } ` ;
25
- }
26
-
27
- function graphLink(
28
- commit : ArtifactDescription ,
29
- stat : string ,
30
- comparison : TestCaseComparison <CompileTestCase >
31
- ): string {
32
- // Move to `30 days ago` to display history of the test case
33
- const start = getPastDate (new Date (commit .date ), 30 );
34
- const end = commit .commit ;
35
- const {benchmark, profile, scenario} = comparison .testCase ;
36
- return ` /index.html?start=${start }&end=${end }&benchmark=${benchmark }&profile=${profile }&scenario=${scenario }&stat=${stat } ` ;
37
- }
38
-
39
- function detailedQueryPercentLink(
40
- commit : ArtifactDescription ,
41
- baseCommit : ArtifactDescription ,
42
- comparison : TestCaseComparison <CompileTestCase >
43
- ): string {
44
- const {benchmark, profile, scenario} = comparison .testCase ;
45
- return ` /detailed-query.html?commit=${commit .commit }&base_commit=${baseCommit .commit }&benchmark=${benchmark }-${profile }&scenario=${scenario } ` ;
46
- }
47
-
48
- function detailedQueryRawDataLink(
49
- commit : ArtifactDescription ,
50
- comparison : TestCaseComparison <CompileTestCase >
51
- ) {
52
- const {benchmark, profile, scenario} = comparison .testCase ;
53
- return ` /detailed-query.html?commit=${commit .commit }&benchmark=${benchmark }-${profile }&scenario=${scenario } ` ;
54
- }
55
-
56
23
function prettifyRawNumber(number : number ): string {
57
24
return number .toLocaleString ();
58
25
}
@@ -85,7 +52,7 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
85
52
<table v-else class =" benches compare" >
86
53
<thead >
87
54
<tr >
88
- <th class =" toggle" ></th >
55
+ <th class =" toggle-arrow " ></th >
89
56
<th >Benchmark</th >
90
57
<th >Profile</th >
91
58
<th >Scenario</th >
@@ -118,42 +85,25 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
118
85
</thead >
119
86
<tbody >
120
87
<template v-for =" comparison in comparisons " >
121
- <tr >
122
- <td @click =" toggleExpanded(comparison.testCase)" class =" toggle" >
88
+ <tr
89
+ @click =" toggleExpanded(comparison.testCase)"
90
+ :class =" {toggle: true, toggled: isExpanded(comparison.testCase)}"
91
+ >
92
+ <td class =" toggle-arrow" >
123
93
{{ isExpanded(comparison.testCase) ? "▼" : "▶" }}
124
94
</td >
125
95
<td >
126
- <a
127
- v-bind:href =" benchmarkLink(comparison.testCase.benchmark)"
128
- class =" silent-link"
129
- target =" _blank"
130
- >
131
- {{ comparison.testCase.benchmark }}
132
- </a >
96
+ {{ comparison.testCase.benchmark }}
133
97
</td >
134
98
<td >
135
- <a
136
- v-bind:href =" graphLink(commitB, stat, comparison)"
137
- target =" _blank"
138
- class =" silent-link"
139
- >
140
- {{ comparison.testCase.profile }}
141
- </a >
99
+ {{ comparison.testCase.profile }}
142
100
</td >
143
101
<td >{{ comparison.testCase.scenario }}</td >
144
102
<td >
145
103
<div class =" numeric-aligned" >
146
- <div >
147
- <a
148
- v-bind:href ="
149
- detailedQueryPercentLink(commitB, commitA, comparison)
150
- "
151
- >
152
- <span v-bind:class =" percentClass(comparison.percent)" >
153
- {{ comparison.percent.toFixed(2) }}%
154
- </span >
155
- </a >
156
- </div >
104
+ <span v-bind:class =" percentClass(comparison.percent)" >
105
+ {{ comparison.percent.toFixed(2) }}%
106
+ </span >
157
107
</div >
158
108
</td >
159
109
<td class =" narrow" >
@@ -179,24 +129,21 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
179
129
</div >
180
130
</td >
181
131
<td v-if =" showRawData" class =" numeric" >
182
- <a v-bind:href =" detailedQueryRawDataLink(commitA, comparison)" >
183
- <abbr :title =" comparison.datumA.toString()"
184
- >{{ prettifyRawNumber(comparison.datumA) }}{{ unit }}</abbr
185
- >
186
- </a >
132
+ <abbr :title =" comparison.datumA.toString()" >
133
+ {{ prettifyRawNumber(comparison.datumA) }}{{ unit }}
134
+ </abbr >
187
135
</td >
188
136
<td v-if =" showRawData" class =" numeric" >
189
- <a v-bind:href =" detailedQueryRawDataLink(commitB, comparison)" >
190
- <abbr :title =" comparison.datumB.toString()"
191
- >{{ prettifyRawNumber(comparison.datumB) }}{{ unit }}</abbr
192
- >
193
- </a >
137
+ <abbr :title =" comparison.datumB.toString()" >
138
+ {{ prettifyRawNumber(comparison.datumB) }}{{ unit }}
139
+ </abbr >
194
140
</td >
195
141
</tr >
196
142
<tr v-if =" isExpanded(comparison.testCase)" >
197
143
<td :colspan =" columnCount" >
198
144
<BenchmarkDetail
199
145
:test-case =" comparison.testCase"
146
+ :base-artifact =" commitA"
200
147
:artifact =" commitB"
201
148
:metric =" stat"
202
149
:benchmark-map =" benchmarkMap"
@@ -214,6 +161,7 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
214
161
width : 100% ;
215
162
table-layout : auto ;
216
163
font-size : medium ;
164
+ border-collapse : collapse ;
217
165
218
166
td ,
219
167
th {
@@ -240,14 +188,22 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
240
188
th {
241
189
text-align : center ;
242
190
243
- & .toggle {
191
+ & .toggle-arrow {
244
192
padding-right : 5px ;
245
- cursor : pointer ;
246
193
}
247
194
& .narrow {
248
195
max-width : 100px ;
249
196
}
250
197
}
198
+
199
+ .toggle {
200
+ cursor : pointer ;
201
+
202
+ & :hover ,
203
+ & .toggled {
204
+ background-color : #d6d3d35c ;
205
+ }
206
+ }
251
207
}
252
208
253
209
.benches td {
0 commit comments