@@ -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 ( 1000 * score . total_score / score . total_tests ) / 10 } %</b></br>
42
+ Subtests: <b>${ Math . floor ( 1000 * score . total_subtests_passed / score . total_subtests ) / 10 } %</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,37 +144,16 @@ 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 )
148
153
}
149
154
chart . draw ( table , options )
150
155
}
151
156
152
- function removeChildren ( parent ) {
153
- while ( parent . firstChild ) {
154
- parent . removeChild ( parent . firstChild )
155
- }
156
- return parent
157
- }
158
-
159
- function update_table ( scores ) {
160
- const score_table = document . getElementById ( 'score-table-body' )
161
- removeChildren ( score_table )
162
-
163
- for ( const [ idx , area ] of scores . area_keys . entries ( ) ) {
164
- const recent_score = scores . scores [ scores . scores . length - 1 ]
165
- score_table . insertAdjacentHTML (
166
- 'beforeend' ,
167
- `<tr class="${ idx % 2 ? 'odd' : 'even' } ">
168
- <td>${ scores . focus_areas [ area ] } </td>
169
- <td class="score">${ String ( recent_score [ idx + AREA_SCORE_OFFSET ] / 10 ) . padEnd ( 4 , '.0' ) } %</td>
170
- </tr>`
171
- )
172
- }
173
- }
174
-
175
157
fetchData
176
158
. then ( resp => resp . json ( ) )
177
159
. then ( scores => {
@@ -213,7 +195,6 @@ function setupChart () {
213
195
}
214
196
area_dropdown . value = scores . area_keys [ 0 ]
215
197
period_dropdown . value = Object . keys ( periodRanges ) [ 4 ]
216
- update_table ( scores )
217
198
update_chart ( )
218
199
} )
219
200
}
0 commit comments