diff --git a/assets/js/load-chart.js b/assets/js/load-chart.js index 2cfe72fd5..55a176a28 100644 --- a/assets/js/load-chart.js +++ b/assets/js/load-chart.js @@ -38,7 +38,8 @@ function parseDateString (date) { function toolTip (date, wpt_sha, servo_version, score, engine) { return ` ${formatDate(date)} - Score: ${score / 10} + Score: ${Math.floor(1000 * score.total_score / score.total_tests) / 10}% + Subtests: ${Math.floor(1000 * score.total_subtests_passed / score.total_subtests) / 10}% WPT: ${wpt_sha} Servo (${engine}): ${servo_version} ` @@ -129,7 +130,9 @@ function setupChart () { table.addColumn('date', 'runOn') options.series.push({ color: dark_mode ? '#CC9933' : '#3366CC' }) - table.addColumn('number', 'Servo') + table.addColumn('number', 'Score') + table.addColumn({ type: 'string', role: 'tooltip', p: { html: true } }) + table.addColumn('number', 'Subtests') table.addColumn({ type: 'string', role: 'tooltip', p: { html: true } }) for (const scores_for_run of all_scores.scores) { @@ -141,7 +144,9 @@ function setupChart () { } const row = [ date, - area_score / 1000, + area_score.total_score / area_score.total_tests, + toolTip(date, wpt_sha, browser_version, area_score, 'Servo'), + area_score.total_subtests_passed / area_score.total_subtests, toolTip(date, wpt_sha, browser_version, area_score, 'Servo') ] table.addRow(row) @@ -149,29 +154,6 @@ function setupChart () { chart.draw(table, options) } - function removeChildren (parent) { - while (parent.firstChild) { - parent.removeChild(parent.firstChild) - } - return parent - } - - function update_table (scores) { - const score_table = document.getElementById('score-table-body') - removeChildren(score_table) - - for (const [idx, area] of scores.area_keys.entries()) { - const recent_score = scores.scores[scores.scores.length - 1] - score_table.insertAdjacentHTML( - 'beforeend', - `
Test Suite | Score |
---|
Test Suite | Score | Subtests |
---|
- Scores are calculated as percentages of total enabled
- tests within the suite that pass. A passing test with no
- subtests gets a score of 1 while a test with subtests gets a
- score between 0 and 1 representing the fraction of passing
- subtests within that test. This is different from the
- percentages on wpt.fyi which is calculated by giving equal
- weight to both top-level tests and subtests.
+ The results are calculated as percentages of total enabled tests within the suite that pass.
+ Scores are computed as follows: a passing test with no subtests gets a score of 1
+ while a test with subtests gets a score between 0 and 1 representing the fraction of passing subtests within that test.
+ Subtests are calculated by giving equal weight to both top-level tests and subtests.