Title: [90682] trunk/Tools
Revision
90682
Author
[email protected]
Date
2011-07-09 12:05:44 -0700 (Sat, 09 Jul 2011)

Log Message

Teach TestFailures to abbreviate the examples of test flakiness

These lists can get quite long, and it's not really helpful in most cases to have soooooo
many examples of flakiness.

Fixes <http://webkit.org/b/64203> Lists of flaky revisions on TestFailures page can get so
long they're hard to navigate

Reviewed by Dan Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FlakyLayoutTestDetector.js:
(FlakyLayoutTestDetector.prototype.flakinessExamples): If we have more than a certain number
of examples, replace the middle items with a separator.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css:
(.flakiness-example-separator): Added styles for the separator.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
(ViewController.prototype._domForPossiblyFlakyTests): Use a vertical ellipsis to represent
the separator.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FlakyLayoutTestDetector.js (90681 => 90682)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FlakyLayoutTestDetector.js	2011-07-09 14:35:13 UTC (rev 90681)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FlakyLayoutTestDetector.js	2011-07-09 19:05:44 UTC (rev 90682)
@@ -88,6 +88,24 @@
             examples.push(history[i + 1]);
         }
 
+        // The list of examples can get quite long. Instead of showing the whole list, we abbreviate
+        // by replacing the middle items with a separator.
+        const startAndEndAbbreviatedExamplesCount = 3;
+        console.assert(startAndEndAbbreviatedExamplesCount > 1);
+        var abbreviatedExamplesToShow = 2 * startAndEndAbbreviatedExamplesCount;
+        if (examples.length > abbreviatedExamplesToShow) {
+            var examplesBeforeSeparator = examples.slice(0, startAndEndAbbreviatedExamplesCount);
+            var examplesAfterSeparator = examples.slice(-startAndEndAbbreviatedExamplesCount);
+
+            // There's no real use in having two "pass" examples in a row immediately next to the
+            // separator.
+            if (examplesBeforeSeparator[examplesBeforeSeparator.length - 1].result.failureType === 'pass' && examplesBeforeSeparator[examplesBeforeSeparator.length - 2].result.failureType === 'pass')
+                examplesBeforeSeparator.splice(examplesBeforeSeparator.length - 1, 1);
+            if (examplesAfterSeparator[0].result.failureType === 'pass' && examplesAfterSeparator[1].result.failureType === 'pass')
+                examplesAfterSeparator.splice(0, 1);
+            examples = examplesBeforeSeparator.concat({ isSeparator: true }, examplesAfterSeparator);
+        }
+
         return examples;
     },
 

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css (90681 => 90682)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css	2011-07-09 14:35:13 UTC (rev 90681)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css	2011-07-09 19:05:44 UTC (rev 90682)
@@ -59,3 +59,8 @@
 .new-bug-form {
     display: none;
 }
+
+.flakiness-example-separator {
+    padding-left: 5em;
+    font-size: larger;
+}

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js (90681 => 90682)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js	2011-07-09 14:35:13 UTC (rev 90681)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js	2011-07-09 19:05:44 UTC (rev 90682)
@@ -511,6 +511,12 @@
             item.appendChild(historyList);
             historyList.appendChildren(possiblyFlakyTestData[testName].map(function(historyItem) {
                 var item = document.createElement('li');
+                if (historyItem.isSeparator) {
+                    const verticalEllipsis = '\u22ee';
+                    item.appendChild(document.createTextNode(verticalEllipsis));
+                    item.className = 'flakiness-example-separator';
+                    return item;
+                }
                 item.appendChild(self._domForBuildName(builder, historyItem.build));
                 item.appendChild(document.createTextNode(': '));
                 item.appendChild(self._domForFailureDiagnosis(builder, historyItem.build, testName, historyItem.result));

Modified: trunk/Tools/ChangeLog (90681 => 90682)


--- trunk/Tools/ChangeLog	2011-07-09 14:35:13 UTC (rev 90681)
+++ trunk/Tools/ChangeLog	2011-07-09 19:05:44 UTC (rev 90682)
@@ -1,3 +1,26 @@
+2011-07-09  Adam Roben  <[email protected]>
+
+        Teach TestFailures to abbreviate the examples of test flakiness
+
+        These lists can get quite long, and it's not really helpful in most cases to have soooooo
+        many examples of flakiness.
+
+        Fixes <http://webkit.org/b/64203> Lists of flaky revisions on TestFailures page can get so
+        long they're hard to navigate
+
+        Reviewed by Dan Bates.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FlakyLayoutTestDetector.js:
+        (FlakyLayoutTestDetector.prototype.flakinessExamples): If we have more than a certain number
+        of examples, replace the middle items with a separator.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css:
+        (.flakiness-example-separator): Added styles for the separator.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
+        (ViewController.prototype._domForPossiblyFlakyTests): Use a vertical ellipsis to represent
+        the separator.
+
 2011-07-09  Dirk Pranke  <[email protected]>
 
         nrwt: stack traces from worker-side exceptions aren't very useful inside test-webkitpy
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to