1
1
<script setup lang="ts">
2
- import {TestCase } from " ../data" ;
2
+ import {CompileTestCase , TestCaseComparison } from " ../data" ;
3
3
import Tooltip from " ../tooltip.vue" ;
4
4
import {ArtifactDescription } from " ../types" ;
5
5
import {percentClass } from " ../shared" ;
6
6
7
7
const props = defineProps <{
8
8
id: string ;
9
- cases: TestCase [];
9
+ cases: TestCaseComparison < CompileTestCase > [];
10
10
hasNonRelevant: boolean ;
11
11
showRawData: boolean ;
12
12
commitA: ArtifactDescription ;
@@ -21,7 +21,7 @@ function benchmarkLink(benchmark: string): string {
21
21
function graphLink(
22
22
commit : ArtifactDescription ,
23
23
stat : string ,
24
- testCase : TestCase
24
+ comparison : TestCaseComparison < CompileTestCase >
25
25
): string {
26
26
let date = new Date (commit .date );
27
27
// Move to `30 days ago` to display history of the test case
@@ -32,22 +32,22 @@ function graphLink(
32
32
let start = ` ${year }-${month }-${day } ` ;
33
33
34
34
let end = commit .commit ;
35
- return ` /index.html?start=${start }&end=${end }&benchmark=${testCase .benchmark }&profile=${testCase .profile }&scenario=${testCase .scenario }&stat=${stat } ` ;
35
+ return ` /index.html?start=${start }&end=${end }&benchmark=${comparison . testCase .benchmark }&profile=${comparison . testCase .profile }&scenario=${comparison . testCase .scenario }&stat=${stat } ` ;
36
36
}
37
37
38
38
function detailedQueryPercentLink(
39
39
commit : ArtifactDescription ,
40
40
baseCommit : ArtifactDescription ,
41
- testCase : TestCase
41
+ comparison : TestCaseComparison < CompileTestCase >
42
42
): string {
43
- return ` /detailed-query.html?commit=${commit .commit }&base_commit=${baseCommit .commit }&benchmark=${testCase .benchmark }-${testCase .profile }&scenario=${testCase .scenario } ` ;
43
+ return ` /detailed-query.html?commit=${commit .commit }&base_commit=${baseCommit .commit }&benchmark=${comparison . testCase .benchmark }-${comparison . testCase .profile }&scenario=${comparison . testCase .scenario } ` ;
44
44
}
45
45
46
46
function detailedQueryRawDataLink(
47
47
commit : ArtifactDescription ,
48
- testCase : TestCase
48
+ comparison : TestCaseComparison < CompileTestCase >
49
49
) {
50
- return ` /detailed-query.html?commit=${commit .commit }&benchmark=${testCase .benchmark }-${testCase .profile }&scenario=${testCase .scenario } ` ;
50
+ return ` /detailed-query.html?commit=${commit .commit }&benchmark=${comparison . testCase .benchmark }-${comparison . testCase .profile }&scenario=${comparison . testCase .scenario } ` ;
51
51
}
52
52
53
53
function prettifyRawNumber(number : number ): string {
@@ -95,37 +95,37 @@ function prettifyRawNumber(number: number): string {
95
95
</tr >
96
96
</thead >
97
97
<tbody >
98
- <template v-for =" testCase in cases " >
98
+ <template v-for =" comparison in cases " >
99
99
<tr >
100
100
<td >
101
101
<a
102
- v-bind:href =" benchmarkLink(testCase.benchmark)"
102
+ v-bind:href =" benchmarkLink(comparison. testCase.benchmark)"
103
103
class =" silent-link"
104
104
target =" _blank"
105
105
>
106
- {{ testCase.benchmark }}
106
+ {{ comparison. testCase.benchmark }}
107
107
</a >
108
108
</td >
109
109
<td >
110
110
<a
111
- v-bind:href =" graphLink(commitB, stat, testCase )"
111
+ v-bind:href =" graphLink(commitB, stat, comparison )"
112
112
target =" _blank"
113
113
class =" silent-link"
114
114
>
115
- {{ testCase.profile }}
115
+ {{ comparison. testCase.profile }}
116
116
</a >
117
117
</td >
118
- <td >{{ testCase.scenario }}</td >
118
+ <td >{{ comparison. testCase.scenario }}</td >
119
119
<td >
120
120
<div class =" numeric-aligned" >
121
121
<div >
122
122
<a
123
123
v-bind:href ="
124
- detailedQueryPercentLink(commitB, commitA, testCase )
124
+ detailedQueryPercentLink(commitB, commitA, comparison )
125
125
"
126
126
>
127
- <span v-bind:class =" percentClass(testCase .percent)" >
128
- {{ testCase .percent.toFixed(2) }}%
127
+ <span v-bind:class =" percentClass(comparison .percent)" >
128
+ {{ comparison .percent.toFixed(2) }}%
129
129
</span >
130
130
</a >
131
131
</div >
@@ -135,8 +135,8 @@ function prettifyRawNumber(number: number): string {
135
135
<div class =" numeric-aligned" >
136
136
<div >
137
137
{{
138
- testCase .significanceThreshold
139
- ? testCase .significanceThreshold.toFixed(2) + "%"
138
+ comparison .significanceThreshold
139
+ ? comparison .significanceThreshold.toFixed(2) + "%"
140
140
: "-"
141
141
}}
142
142
</div >
@@ -146,24 +146,24 @@ function prettifyRawNumber(number: number): string {
146
146
<div class =" numeric-aligned" >
147
147
<div >
148
148
{{
149
- testCase .significanceFactor
150
- ? testCase .significanceFactor.toFixed(2) + "x"
149
+ comparison .significanceFactor
150
+ ? comparison .significanceFactor.toFixed(2) + "x"
151
151
: "-"
152
152
}}
153
153
</div >
154
154
</div >
155
155
</td >
156
156
<td v-if =" showRawData" class =" numeric" >
157
- <a v-bind:href =" detailedQueryRawDataLink(commitA, testCase )" >
158
- <abbr :title =" testCase .datumA" >{{
159
- prettifyRawNumber(testCase .datumA)
157
+ <a v-bind:href =" detailedQueryRawDataLink(commitA, comparison )" >
158
+ <abbr :title =" comparison .datumA" >{{
159
+ prettifyRawNumber(comparison .datumA)
160
160
}}</abbr >
161
161
</a >
162
162
</td >
163
163
<td v-if =" showRawData" class =" numeric" >
164
- <a v-bind:href =" detailedQueryRawDataLink(commitB, testCase )" >
165
- <abbr :title =" testCase .datumB" >{{
166
- prettifyRawNumber(testCase .datumB)
164
+ <a v-bind:href =" detailedQueryRawDataLink(commitB, comparison )" >
165
+ <abbr :title =" comparison .datumB" >{{
166
+ prettifyRawNumber(comparison .datumB)
167
167
}}</abbr >
168
168
</a >
169
169
</td >
0 commit comments