Title: [227750] trunk/Websites/perf.webkit.org
Revision
227750
Author
[email protected]
Date
2018-01-29 12:38:37 -0800 (Mon, 29 Jan 2018)

Log Message

Add the support for reporting Speedometer 2.0 results to perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=182089
<rdar://problem/36172346>

Rubber-stamped by Chris Dumez.

Apparently, this has always worked since the very first version of the perf dashboard added in r163688.
The relevant code is at the line 313 of report-processor.php now.

Added regression tests for this feature since we didn't have any tests four years ago.

* server-tests/api-report-tests.js:

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (227749 => 227750)


--- trunk/Websites/perf.webkit.org/ChangeLog	2018-01-29 20:35:11 UTC (rev 227749)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2018-01-29 20:38:37 UTC (rev 227750)
@@ -1,5 +1,20 @@
 2018-01-29  Ryosuke Niwa  <[email protected]>
 
+        Add the support for reporting Speedometer 2.0 results to perf dashboard
+        https://bugs.webkit.org/show_bug.cgi?id=182089
+        <rdar://problem/36172346>
+
+        Rubber-stamped by Chris Dumez.
+
+        Apparently, this has always worked since the very first version of the perf dashboard added in r163688.
+        The relevant code is at the line 313 of report-processor.php now.
+
+        Added regression tests for this feature since we didn't have any tests four years ago.
+
+        * server-tests/api-report-tests.js:
+
+2018-01-29  Ryosuke Niwa  <[email protected]>
+
         REGRESSION(r225898): The perf dashboard fails to open when there are no summary pages
         https://bugs.webkit.org/show_bug.cgi?id=182210
 

Modified: trunk/Websites/perf.webkit.org/server-tests/api-report-tests.js (227749 => 227750)


--- trunk/Websites/perf.webkit.org/server-tests/api-report-tests.js	2018-01-29 20:35:11 UTC (rev 227749)
+++ trunk/Websites/perf.webkit.org/server-tests/api-report-tests.js	2018-01-29 20:38:37 UTC (rev 227750)
@@ -554,6 +554,96 @@
         });
     });
 
+    it("should be able to compute the aggregation of differently aggregated values", async () => {
+        const reportWithDifferentAggregators = {
+            "buildNumber": "123",
+            "buildTime": "2013-02-28T10:12:03.388304",
+            "builderName": "someBuilder",
+            "builderPassword": "somePassword",
+            "platform": "Mountain Lion",
+            "tests": {
+                "DummyBenchmark": {
+                    "metrics": {"Time": ["Arithmetic"]},
+                    "tests": {
+                        "DOM": {
+                            "metrics": {"Time": ["Total"]},
+                            "tests": {
+                                "ModifyNodes": {"metrics": {"Time": { "current": [[1, 2], [3, 4]] }}},
+                                "TraverseNodes": {"metrics": {"Time": { "current": [[11, 12], [13, 14]] }}}
+                            }
+                        },
+                        "CSS": {"metrics": {"Time": { "current": [[21, 22], [23, 24]] }}}
+                    }
+                }
+            },
+            "revisions": {
+                "macOS": {
+                    "revision": "10.8.2 12C60"
+                },
+                "WebKit": {
+                    "revision": "141977",
+                    "timestamp": "2013-02-06T08:55:20.9Z"
+                }
+            }};
+
+        await reportAfterAddingBuilderAndAggregators(reportWithDifferentAggregators);
+        const result = await fetchTestRunIterationsForMetric('DummyBenchmark', 'Time');
+
+        const run = result.run;
+        const runId = run['id'];
+        const expectedIterations = [];
+        let sum = 0;
+        let squareSum = 0;
+        for (let i = 0; i < 4; ++i) {
+            const value = i + 1;
+            const DOMTotal = (value + 10 + value);
+            const expectedValue = (DOMTotal + (20 + value)) / 2;
+            sum += expectedValue;
+            squareSum += expectedValue * expectedValue;
+            expectedIterations.push({run: runId, order: i, group: Math.floor(i / 2), value: expectedValue, relative_time: null});
+        }
+        assert.deepEqual(result.iterations, expectedIterations);
+        assert.equal(run['mean_cache'], sum / result.iterations.length);
+        assert.equal(run['sum_cache'], sum);
+        assert.equal(run['square_sum_cache'], squareSum);
+    });
+
+    it("should reject a report when there are more than non-matching aggregators in a subtest", async () => {
+        const reportWithAmbigiousAggregators = {
+            "buildNumber": "123",
+            "buildTime": "2013-02-28T10:12:03.388304",
+            "builderName": "someBuilder",
+            "builderPassword": "somePassword",
+            "platform": "Mountain Lion",
+            "tests": {
+                "DummyBenchmark": {
+                    "metrics": {"Time": ["Arithmetic"]},
+                    "tests": {
+                        "DOM": {
+                            "metrics": {"Time": ["Total", "Geometric"]},
+                            "tests": {
+                                "ModifyNodes": {"metrics": {"Time": { "current": [[1, 2], [3, 4]] }}},
+                                "TraverseNodes": {"metrics": {"Time": { "current": [[11, 12], [13, 14]] }}}
+                            }
+                        },
+                        "CSS": {"metrics": {"Time": { "current": [[21, 22], [23, 24]] }}}
+                    }
+                }
+            },
+            "revisions": {
+                "macOS": {
+                    "revision": "10.8.2 12C60"
+                },
+                "WebKit": {
+                    "revision": "141977",
+                    "timestamp": "2013-02-06T08:55:20.9Z"
+                }
+            }};
+
+        const response = await reportAfterAddingBuilderAndAggregatorsWithResponse(reportWithAmbigiousAggregators);
+        assert.equal(response['status'], 'NoMatchingAggregatedValueInSubtest');
+    });
+
     function reportWithSameSubtestName()
     {
         return {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to