Show t-test results based on individual measurements to analysis task page.
[WebKit-https.git] / Websites / perf.webkit.org / public / v3 / components / test-group-results-viewer.js
index 4b2feac..4dea785 100644 (file)
@@ -57,7 +57,8 @@ class TestGroupResultsViewer extends ComponentBase {
                     element('th', {class: 'metric-direction'}, ''),
                     element('th', {colspan: 2}, 'Results'),
                     element('th', 'Averages'),
-                    element('th', 'Comparison'),
+                    element('th', 'Comparison by mean'),
+                    element('th', 'Comparison by individual iterations')
                 ]),
             ]),
             tests.map((test) => this._buildRowsForTest(testGroup, expandedTests, test, [], maxDepth, 0))]);
@@ -112,7 +113,7 @@ class TestGroupResultsViewer extends ComponentBase {
             const entry = valueMap.get(commitSet);
             const previousEntry = valueMap.get(previousCommitSet);
 
-            const comparison = entry && previousEntry ? testGroup.compareTestResults(metric, previousEntry.filteredValues, entry.filteredValues) : null;
+            const comparison = entry && previousEntry ? testGroup.compareTestResults(metric, previousEntry.filteredMeasurements, entry.filteredMeasurements) : null;
             const valueLabels = entry.measurements.map((measurement) => measurement ?  formatValue(measurement.value, measurement.interval) : '-');
 
             const barCell = element('td', {class: 'plot-bar'},
@@ -120,15 +121,17 @@ class TestGroupResultsViewer extends ComponentBase {
             barCell.expandedHeight = +valueLabels.length + 'rem';
             barCells.push(barCell);
 
-            const significance = comparison && comparison.isStatisticallySignificant ? 'significant' : 'negligible';
+            const significanceForMean = comparison && comparison.isStatisticallySignificantForMean ? 'significant' : 'negligible';
+            const significanceForIndividual = comparison && comparison.isStatisticallySignificantForIndividual ? 'significant' : 'negligible';
             const changeType = comparison ? comparison.changeType : null;
             return [
                 element('th', testGroup.labelForCommitSet(commitSet)),
                 barCell,
                 element('td', formatValue(entry.mean, entry.interval)),
-                element('td', {class: `comparison ${changeType} ${significance}`}, comparison ? comparison.fullLabel : ''),
+                element('td', {class: `comparison ${changeType} ${significanceForMean}`}, comparison ? comparison.fullLabelForMean : ''),
+                element('td', {class: `comparison ${changeType} ${significanceForIndividual}`}, comparison ? comparison.fullLabelForIndividual : ''),
             ];
-        }
+        };
 
         this._barGraphCellMap.set(metric, {barGroup, barCells});
 
@@ -166,10 +169,11 @@ class TestGroupResultsViewer extends ComponentBase {
         for (const commitSet of commitSets) {
             const requests = testGroup.requestsForCommitSet(commitSet);
             const measurements = requests.map((request) => resultsView.resultForRequest(request));
-            const filteredValues = measurements.filter((result) => !!result).map((measurement) => measurement.value);
+            const filteredMeasurements = measurements.filter((result) => !!result);
+            const filteredValues = filteredMeasurements.map((measurement) => measurement.value);
             const allValues = measurements.map((result) => result != null ? result.value : NaN);
             const interval = Statistics.confidenceInterval(filteredValues);
-            map.set(commitSet, {requests, measurements, filteredValues, allValues, mean: Statistics.mean(filteredValues), interval});
+            map.set(commitSet, {requests, measurements, filteredMeasurements, allValues, mean: Statistics.mean(filteredValues), interval});
         }
         return map;
     }