@@ -38,7 +38,8 @@ function parseDateString (date) {
38
38
function toolTip ( date , wpt_sha , servo_version , score , engine ) {
39
39
return `
40
40
<b>${ formatDate ( date ) } </b></br>
41
- Score: <b>${ score / 10 } </b></br>
41
+ Score: <b>${ Math . floor ( 100 * score . total_score / score . total_tests ) } %</b></br>
42
+ Subtests: <b>${ Math . floor ( 100 * score . total_subtests_passed / score . total_subtests ) } %</b></br>
42
43
WPT: ${ wpt_sha } </br>
43
44
Servo (${ engine } ): ${ servo_version }
44
45
`
@@ -129,7 +130,9 @@ function setupChart () {
129
130
table . addColumn ( 'date' , 'runOn' )
130
131
131
132
options . series . push ( { color : dark_mode ? '#CC9933' : '#3366CC' } )
132
- table . addColumn ( 'number' , 'Servo' )
133
+ table . addColumn ( 'number' , 'Score' )
134
+ table . addColumn ( { type : 'string' , role : 'tooltip' , p : { html : true } } )
135
+ table . addColumn ( 'number' , 'Subtests' )
133
136
table . addColumn ( { type : 'string' , role : 'tooltip' , p : { html : true } } )
134
137
135
138
for ( const scores_for_run of all_scores . scores ) {
@@ -141,7 +144,9 @@ function setupChart () {
141
144
}
142
145
const row = [
143
146
date ,
144
- area_score / 1000 ,
147
+ area_score . total_score / area_score . total_tests ,
148
+ toolTip ( date , wpt_sha , browser_version , area_score , 'Servo' ) ,
149
+ area_score . total_subtests_passed / area_score . total_subtests ,
145
150
toolTip ( date , wpt_sha , browser_version , area_score , 'Servo' )
146
151
]
147
152
table . addRow ( row )
@@ -161,12 +166,15 @@ function setupChart () {
161
166
removeChildren ( score_table )
162
167
163
168
for ( const [ idx , area ] of scores . area_keys . entries ( ) ) {
164
- const recent_score = scores . scores [ scores . scores . length - 1 ]
169
+ const area_score = scores . scores [ scores . scores . length - 1 ] [ idx + AREA_SCORE_OFFSET ]
170
+ const score = Math . floor ( 100 * area_score . total_score / area_score . total_tests )
171
+ const subtests = Math . floor ( 100 * area_score . total_subtests_passed / area_score . total_subtests )
165
172
score_table . insertAdjacentHTML (
166
173
'beforeend' ,
167
174
`<tr class="${ idx % 2 ? 'odd' : 'even' } ">
168
175
<td>${ scores . focus_areas [ area ] } </td>
169
- <td class="score">${ String ( recent_score [ idx + AREA_SCORE_OFFSET ] / 10 ) . padEnd ( 4 , '.0' ) } %</td>
176
+ <td class="score">${ String ( score ) . padEnd ( 4 , '.0' ) } %</td>
177
+ <td class="score">(${ area_score . total_subtests_passed } /${ area_score . total_subtests } ) ${ String ( subtests ) . padEnd ( 4 , '.0' ) } %</td>
170
178
</tr>`
171
179
)
172
180
}
0 commit comments